PDA

View Full Version : [CLOSED] Can't get State-events to fire



Fredrik
Apr 12, 2012, 10:27 AM
I can't get the listeners StateRestore and StateSave to fire in the following code.



<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FrameSize.aspx.cs" Inherits="WebApplication1.FrameSize" %>


<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" 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 id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" StateProvider="Cookie" />
<ext:Window runat="server" ID="Window1" Layout="FitLayout">
<Items>
<ext:Panel ID="Panel1" runat="server" Title="West" Stateful="true" StateEvents="resize">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:Button runat="server" ID="btnAdd" Text="Add" Icon="Add" />
<ext:Button runat="server" ID="btnCloseAll" Text="CloseAll" Icon="Tux" />
</Items>
</ext:Toolbar>
</TopBar>
<Listeners>
<StateRestore Handler="alert('StateRestore');" />
<StateSave Handler="alert('StateSave');" />
</Listeners>
</ext:Panel>
</Items>
</ext:Window>
</form>
</body>
</html>

Daniil
Apr 12, 2012, 10:49 AM
Hi,

For now, please replace

Stateful="true"
with

<CustomConfig>
<ext:ConfigItem Name="stateful" Value="true" Mode="Raw" />
</CustomConfig>

Fredrik
Apr 12, 2012, 11:52 AM
Works for now. Thanks.

Daniil
May 02, 2012, 5:44 PM
We have fixed it, revision #3980.

Now this works

Stateful="true"

Please note that the default value is false. So, to enable the stateful mechanism you should set up Stateful to true explicitly.

Thanks for the report.