-
FEATURED COMPONENTS
First time here? Check out the FAQ!
My ZK composer class,
public class CreateRuleComposer extends GenericForwardComposer<Component> implements Constraint {
@Wire Toolbarbutton checkOut;
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
checkOut.addEventListener(Events.ON_CLICK, new NodeSelectListener());
}
@Listen("onCheckSelectEvent =
#checkOut") public void onCheckSelectEvent() { System.out.println("Not called????????"); for(int i=0;i<10000000;i++){ try {
Thread.sleep(10); } catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace(); } }
Clients.clearBusy(); }
@SuppressWarnings("rawtypes")
protected class NodeSelectListener implements EventListener {
public void onEvent(Event event) throws Exception { System.out.println("Called ....."); // Execute showing message execute onCacheSelectEvent method Events.echoEvent("onCheckSelectEvent", checkOut, null); Clients.showBusy("Processing Data..."); }
} }
The echo event is no geting fired. Is @Wire annotation mandatory? Is there any naming convention should i follow?
Thanks, Baskar.S
See here Event_Firing Docs
I think @wire not mandatory
Just try it:
@Listen("onCheckSelectEvent = #checkOut")
public void onEvent(Event event) throws Exception {
System.out.println("Called .....");
// Execute showing message execute onCacheSelectEvent method
Events.echoEvent("onCheckSelectEvent", checkOut, null);
Clients.showBusy("Processing Data...");
}
}
Is this correct?
@Listen("onCheckSelectEvent = #checkOut") public void onEvent(Event event) throws Exception { System.out.println("Called .....");
// Execute showing message execute onCacheSelectEvent method
Events.echoEvent("**onCheckSelectEvent**", checkOut, null);
Clients.showBusy("Processing Data...");
}
Here, echo event calls itself.
Asked: 2014-01-10 02:12:19 +0800
Seen: 25 times
Last updated: Jan 15 '14
Controller updating UI every minute
annotation porting from zk 3.6.2 to 6.5.3
How to customize "Processing..." message
JBoss AS 7.1 +Spring+ZK+DHtmlLayoutServlet
Portallayout, portalchildren ordering storage, possible bug
Sniffer Based Monitoring of ZK Apps
The server is temporarily out of service. (syntax error (SyntaxError))