PDA

View Full Version : [CLOSED] PostBack inside autoloaded page



Rod
Sep 26, 2008, 7:14 AM
Hello.
I'm running into some issues while trying to perform this simple scenario.
I got a border layout with west and center region.
West region allow me to dynamically load tabpanels inside center region, while specifying the autoload property.

1. With IE7, the tab is created, but the page doesnt load -> unkown execution error
2. With FF2, the tab is created, page load, but PostBack from the loaded page fails while deserializing ViewState.

Here is a simplified sample :

Default.aspx




<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="sample_Default" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Page sans titre</title>
</head>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server"></ext:ScriptManager>
<ext:ViewPort ID="ViewPort1" runat="server">
<Content>
<ext:BorderLayout ID="BorderLayout2" runat="server">
<West Collapsible="true" Split="true">
<ext:Panel ID="Panel8" runat="server" Title="Menu" Width="175">
<Content>
<ext:Accordion ID="Accordion1" runat="server" Animate="true">
<ext:Panel ID="Panel9" runat="server" Border="false" Collapsed="false" Icon="FolderGo" Title="Item 1">
<Content>
<div onclick="addTab('Cr?er une cat?gorie', 'Button.aspx');" class="linkMenu">Nouvelle cat?gorie

</Content>
</ext:Panel>
</ext:Accordion>
</Content>
</ext:Panel>
</West>
<Center>
<ext:Panel ID="Panel11" runat="server" Title="Center">
<Content>
<ext:FitLayout ID="FitLayout2" runat="server">
<ext:TabPanel ID="TabPanel2" runat="server" ActiveTab="0" Border="false" Title="Center" AutoScroll="true" EnableTabScroll="true">
<Tabs>
<ext:Tab ID="Tab3" runat="server" Closable="true" Title="Accueil">
<Content>
Sélectionnez une action dans le menu
</Content>
</ext:Tab>
</Tabs>
</ext:TabPanel>
</ext:FitLayout>
</Content>
</ext:Panel>
</Center>
</ext:BorderLayout>
</Content>
</ext:ViewPort>
<script type="text/javascript">
function addTab(titre, url) {
TabPanel2.add({
title: titre,
closable: true,
autoLoad: url
}).show();
}
</script>
</form>
</body>
</html>



Button.aspx


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="button.aspx.vb" Inherits="sample_button" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Page sans titre</title>
</head>
<body>
<form id="form1" runat="server">

<asp:Button ID="Button1" runat="server" Text="Button" />


</form>
</body>
</html>


Any help would be much appreciated :)

Also i'm working on some showcase for my boss and would be interested in testing v0.6 if you still need ppl to do it. Geoff I tried to email you about it, but looks like I didn't have enough access rights to do it :(

geoffrey.mcgill
Sep 26, 2008, 7:26 AM
Hi Rod,


The following posts/topics should help answer questions re: the .AutoLoad property


1. http://forums.ext.net/showthread.php?postid=1234.aspx
2. http://forums.ext.net/showthread.php?threadid=1928-16-1.aspx

Summary: it might be best to use an <iframe> if you need the external Page to perform AutoPostBacks.

Hope this helps.

geoffrey.mcgill
Sep 26, 2008, 7:27 AM
Moving thread to Help (http://forums.ext.net/forumdisplay.php?forumid=4-1.aspx) forum.

Rod
Sep 26, 2008, 7:40 AM
Thanks for the quick answer, and sry for missing those thread, i was focusing on threads about TabPanel/Postback :(

Using an iframe in the html property solved both issued, ty :)