Apr 04, 2010, 9:48 AM
[CLOSED] [1.0] parentAutoLoadControl is lost after reload
Hi,I have a page loaded in Iframe. In the child page panel I have a tool bar with a button reload. I have a listener which calls "parentAutoLoadControl.reload()". The panel reloads on the 1st occasion. On the 2nd occasion it throws an exception parentAutoLoadControl is undefined. Please check the following code.
test.aspx
test1.aspx
test.aspx
<%@ Page Language="C#" %>
<!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></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Panel runat="server" Height="300" Width="500">
<AutoLoad Url="test1.aspx" Mode="IFrame"></AutoLoad>
</ext:Panel>
</form>
</body>
</html>
test1.aspx
<%@ Page Language="C#" %>
<!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></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" ID="scp1">
</ext:ResourceManager>
<ext:Panel runat="server" Height="200" Width="200">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Text="Reload" Icon="Reload" ID="btn1">
<Listeners>
<Click Handler="parentAutoLoadControl.reload();" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<content>
Test Page
</content>
</ext:Panel>
</form>
</body>
</html>