-
FEATURED COMPONENTS
First time here? Check out the FAQ!
i have a window like this
<window id="win" apply='/.../..../MyComposer'>
i need to send a event to ZK throught javascript i have the composer like this
public class MyComposer extends GenericForwardComposer<Window>
{
public void onEventSent$win(final Event event){}
}
later i try to called using this code i also try several variations noone seems to work.
function send(id){zAu.send(new zk.Event(zk.Widget.$('$win'),'onEventSent',id));return;}
i have another composer which responds events from the client and works OK maybe must be only one composer who responds request from clients per APP. i guess not.
hello aviut, look at this: access-java-code-and-component-attributesproperties-from-javascript-code i hope i've helped you
please also check the ZK client side reference - "client-side" firing about that topic.
Maybe you are just missing the toServer: true
as stated there
zAu.send(new zk.Event(wgt, "onFoo", {foo: 'my data'}, {toServer:true}));
You should also check (e.g. in chrome developer tools - network tab) if the event is actually being sent to the server.
I created a small example on ZK Fiddle to show how it can work. Maybe you can change it to match your case so I can fix it afterwards.
Robert
Asked: 2014-05-08 13:26:29 +0800
Seen: 15 times
Last updated: May 26 '14
How to send JSON data with client event?
How to stop combining commands in an ajax call ?
Font Awesome Problem with IE8 when security option "font download" is disabled
Send a client event with JSON data
How to capture the Browser Window Resize/Size Event
Toggled Popup - Close ONLY on toggling, not on focus lost
Verify existence -Verificar existencia DNI