Mar 11, 2012, 5:47 AM
Call both DirectEvent and Listener for the same event
Hello,
Is it possible to define a handler of DirectEvent and Listener for the same event? For example I have this button, in which I define handlers for the click event at the DirectEvent and Listener. Here's the piece of code
Thank you.
Is it possible to define a handler of DirectEvent and Listener for the same event? For example I have this button, in which I define handlers for the click event at the DirectEvent and Listener. Here's the piece of code
<ext:Button ID="ButtonItemSave" runat="server" Text="Save" Icon="Disk">
<DirectEvents>
<Click OnEvent="ButtonItemSave_Click"></Click>
</DirectEvents>
<Listeners>
<Click Handler="#{ButtonItemSave}.setDisabled(true)" />
</Listeners>
</ext:Button>
On the code, when the button is clicked, I want to call server code ButtonItemSave_Click and also run the client script to disable the button. Is this possible? if not, is there any workaround. Any advice would be appreciated.Thank you.