PDA

View Full Version : [CLOSED] TabStrip causing Browser Hung when Performing Widget Assembling



cleve
Feb 24, 2013, 6:05 AM
Hi guys, try this:

- aspx




<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body id="theBody">
<form id="theForm" runat="server">
<ext:ResourceManager ID="theManager" runat="server"
Theme="Default"
ShowWarningOnAjaxFailure="false"
DirectMethodProxy="Ignore"
ScriptMode="Debug" />
<ext:Viewport runat="server" ID="vpMain" Layout="FitLayout">
<Bin>
<ext:Store runat="server" ID="dsGUID" AutoLoad="false">
<Listeners>
</Listeners>
</ext:Store>
<ext:Store runat="server" ID="dsMain" AutoLoad="false">
<Parameters>
<ext:StoreParameter Name="id" Value="Appointment.EntityId" Mode="Raw" />
</Parameters>
<Listeners>
</Listeners>
</ext:Store>
</Bin>
<Items>
<ext:Panel runat="server" Border="false" Layout="BorderLayout">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" ID="b1" Icon="Application" Text="---GO">
<Listeners>
<Click Handler="#{cParticipant}.add(window.testC);window.testC.sho w();" />
</Listeners>
</ext:Button>
<ext:TabStrip runat="server">
<Items>
<ext:Tab ActionItemID="pContent" Text="----" />
</Items>
</ext:TabStrip>
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:Container runat="server" ID="cParticipant" Width="200" Layout="FitLayout"
Region="West" Margins="2 0 2 2" Split="true" />
<ext:Container runat="server" Layout="CardLayout" ActiveIndex="0"
Region="Center" Margins="2 2 2 0">
<Items>
<ext:Panel runat="server" ID="pContent" Layout="FitLayout">
<Content>
</Content>
</ext:Panel>
</Items>
</ext:Container>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
<script runat="server">

protected override void OnInit(EventArgs e)
{
base.OnInit(e);


Control c = Page.LoadControl("control1.ascx");
Page.Form.Controls.AddAt(0, c);
}


</script>





- ascx (control1.ascx)




<%@ Control Language="C#" %>
<ext:GridPanel runat="server" ID="gp" Hidden="true">
<Store>
<ext:Store runat="server" ID="ds" AutoLoad="false">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="A" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:RowNumbererColumn runat="server" Align="Right" Width="25" />
<ext:Column runat="server" Text="A" DataIndex="A" Flex="1" />
</Columns>
</ColumnModel>
<Listeners>
<AfterRender Handler="window.testC=#{gp};" />
</Listeners>
</ext:GridPanel>




Click "--- GO" and browser instance (IE9) turns into busy with 15% cpu time and page response to mouse events becomes extremely low.
Obvious dead looping of some kind. Please take a look. :)

geoffrey.mcgill
Feb 24, 2013, 8:21 AM
I was able to reproduce the problem.

I simplified your original code sample by removing a bunch of code that was not related to the problem.

Example (.aspx)


<%@ Page Language="C#" %>

<script runat="server">
protected override void OnInit(EventArgs e)
{
base.OnInit(e);

Control c = Page.LoadControl("child.ascx");
this.Page.Form.Controls.AddAt(0, c);
}
</script>


<!DOCTYPE html>
<html>


<head runat="server">
<title></title>
</head>
<body id="theBody">
<form id="theForm" runat="server">
<ext:ResourceManager
runat="server"
ShowWarningOnAjaxFailure="false"
DirectMethodProxy="Ignore"
ScriptMode="Debug"
/>


<ext:Viewport runat="server" Layout="FitLayout">
<Items>
<ext:Panel runat="server" Border="false" Layout="BorderLayout">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Icon="Application" Text="---GO">
<Listeners>
<Click Handler="#{cParticipant}.add(window.testC);window.testC.sho w();" />
</Listeners>
</ext:Button>
<ext:TabStrip runat="server">
<Items>
<ext:Tab ActionItemID="pContent" Text="----" />
</Items>
</ext:TabStrip>
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:Container
runat="server"
ID="cParticipant"
Width="200"
Layout="FitLayout"
Region="West"
Margins="2 0 2 2"
Split="true"
/>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>

Example (.ascx)


<%@ Control Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>


<ext:GridPanel runat="server" Hidden="true">
<Store>
<ext:Store runat="server" AutoLoad="false">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="A" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:RowNumbererColumn runat="server" Align="Right" Width="25" />
<ext:Column runat="server" Text="A" DataIndex="A" Flex="1" />
</Columns>
</ColumnModel>
<Listeners>
<AfterRender Handler="window.testC = this;" />
</Listeners>
</ext:GridPanel>

We are investigating.

Vladimir
Feb 25, 2013, 5:28 AM
Hi,

Fixed in SVN, thaks for the report