1

Events.echoEvent not firing

asked 2014-01-10 02:12:19 +0800

udayabaski gravatar image udayabaski
29 1

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

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-01-15 17:16:20 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

updated 2014-01-15 17:27:25 +0800

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...");     

 }

}

link publish delete flag offensive edit
0

answered 2014-01-15 20:21:25 +0800

udayabaski gravatar image udayabaski
29 1

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.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-01-10 02:12:19 +0800

Seen: 25 times

Last updated: Jan 15 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More