Jul 30, 2015, 6:52 PM
[FIXED] [#847] [3.2.1] Layout stops updating after reloading store with AutoLoad = false
The layout stops responding (panel collapse doesn't work, doesn't respond to window resize) after calling reload() on a store defined with AutoLoad="false". It works fine after removing the AutoLoad config property. I'm not sure what the significance is of setting AutoLoad currently - I have it set in a bunch of places because that's how I had it when using v1.x (where I think it would attempt a load call if I didn't explicitly shut off AutoLoad). This wasn't an issue in 3.1 (SVN rev 6401) - I updated to the public 3.2 and then SVN rev 6502 and saw the same result. I'm now going to see how much of a mess it makes if I pull out all of the explicit AutoLoad properties in my code.
Tested in IE11 and Firefox 39.0.
Example:
Tested in IE11 and Firefox 39.0.
Example:
<%@ Page Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
TestStore.ReadData += new Store.AjaxReadDataEventHandler(TestStore_ReadData);
}
protected void TestStore_ReadData(object sender, StoreReadDataEventArgs e)
{
Random testRandom = new Random();
List<object> data = new List<object>();
for (int i = 0; i < 10; i++)
{
data.Add(new { randomNumber = testRandom.NextDouble() });
}
TestStore.DataSource = data;
TestStore.DataBind();
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" Theme="Crisp" />
<ext:Viewport runat="server" Layout="VBoxLayout">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" Pack="Start" />
</LayoutConfig>
<Items>
<ext:GridPanel runat="server" Title="Main" Flex="1">
<Store>
<ext:Store runat="server" ID="TestStore" AutoLoad="false">
<Fields>
<ext:ModelField Name="randomNumber" Type="Float" />
</Fields>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column runat="server" Text="Random Numbers" DataIndex="randomNumber" Flex="1" />
</Columns>
</ColumnModel>
<BottomBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Text="Reload" Handler="#{TestStore}.reload();" />
</Items>
</ext:Toolbar>
</BottomBar>
</ext:GridPanel>
<ext:Panel runat="server"
Height="200"
Title="Bottom"
Collapsible="true">
<Content>this won't collapse after you click Reload</Content>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Last edited by Daniil; Aug 06, 2015 at 8:59 AM.
Reason: [FIXED] [#847] [3.2.1]