Jul 30, 2010, 10:23 AM
Dynamic DirectEvents
Hi,
In my MVC application I want to perform an action where a windows is closed.
I can do that from a button in my menu as follows:
But how can I do the same with DirectEvents?
Has anyone knows to perform this in some other way in order to call an action in my Controller?
Thanks in advance,
Dominik.
In my MVC application I want to perform an action where a windows is closed.
I can do that from a button in my menu as follows:
<ext:Button runat="server" Icon="Cancel" ToolTip="Close window">
<DirectEvents>
<Click Url='<%# Url.Action("Close") %>' AutoDataBind="true">
<ExtraParams>
<ext:Parameter Name="ci" Value="#{Store1}.getAt(0).id" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
<Listeners>
<Click Delay="100" Handler="parentWindow.close();" />
</Listeners>
</ext:Button>
But my windows are created dinamically, so I would like to know how to create DirectEvents to perform the same when user click the close x-cross icon. I can dettect windows close event in this way:w.on("beforeclose", function () { alert('adios close'); });
And I think I can aldo add listeners options when I create windows dynamically:But how can I do the same with DirectEvents?
Has anyone knows to perform this in some other way in order to call an action in my Controller?
Thanks in advance,
Dominik.
Last edited by geoffrey.mcgill; Jul 30, 2010 at 5:05 PM.
Reason: please use [code] tags