0

EchoEvent with GenericForwardComposer

asked 2010-04-26 08:18:20 +0800

danielgoodwin gravatar image danielgoodwin
76 2

zk3.6.3

Wonder if I'm missing a trick here
I am trying to use EchoEvents with a zul file using GenericForwardCOmposer.
The basic EchoEvents sample works fine, but here I'm trying to use with the java file itself
The 'Processing' directive appears, but the OnLater never gets fired.


I have tried variations of OnLater with / without window id , with without Event argument
Any pointers welcome.

Thanks
Daniel

Zul

<window id="echoEventWin" title="Test echoEvent"
      apply="webui.test.EchoEventTester">
    
    <button id="btn_echo" label="Press me">
    </button>
</window>

Code

public class EchoEventTester extends GenericForwardComposer {

	private static final long serialVersionUID = -1L;
	private Button btn_echo;

	private Window echoEventWin;

	public void onClick$btn_echo(Event event) {
		Clients.showBusy("Processing ...", true);
		Events.echoEvent("onLater", self, null);
	}

	public void OnLater$echoEventWin(Event event) {
		try {
			Thread.sleep(2000);
			new Label("Done.").setParent(echoEventWin);
		} catch (Exception ex) {
			// Log exception ..
		} finally {
			Clients.showBusy(null, false);

		}
	}
}

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2010-04-26 08:22:31 +0800

danielgoodwin gravatar image danielgoodwin
76 2

Oops
I should probably do a spell check!!
Apologies. Sometime you can look so hard to find the problem and its right there in front of you!!

onLater != OnLater

Daniel

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2010-04-26 08:18:20 +0800

Seen: 425 times

Last updated: Apr 26 '10

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