0

How to handle asynchronous events from server

asked 2006-03-08 15:36:28 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3618063

By: jim_bo_lisa

I have a custom button class where I have the onClick() method send a query to a facade in my business-tier. This works. I have the result set up in my business tier to call a callback method with the results. This works. The problem is that when I try to reference or instantiate any of the ZK components (ie Label l = new Label("Hi");) I get a NullPointerException. I am guessing this is because the callback has no reference to the ZK session I was in when I clicked my custom button.

>From the User Guide I see there is a ZK AU Engine for handling asynch events.
Is this what I need to handle my situation and to update my ZUL controls when I receive an asynch message/event?

Any samples would help.

Thanks


delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2006-03-09 06:10:10 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3619265

By: tomyeh

ZK components can be handled only in an event listener. It works fine as long as you stay in the same thread as the event listener. For long operation that you prefer to execute in background, please take a look at User's Guide (pp 33).

Jim, please post the stack trace. I would make it more readable (for other developers). Thanks.

link publish delete flag offensive edit

answered 2006-03-29 12:52:43 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3657510

By: nobody

someone could be help me on event zk java interface

exemple i would like to have to intercept the click event on menuitem could you give me an exemple

link publish delete flag offensive edit

answered 2006-03-29 13:49:23 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3657582

By: henrichen

<window title="menu demo" border="normal">
<menubar id="menubar">
<menu label="File">
<menupopup>
<menuitem label="New" onClick="alert("new clicked")"/>
</menupopup>
</menu>
</menubar>
</window>


link publish delete flag offensive edit

answered 2006-03-29 14:03:04 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3657607

By: nobody

yes i anderstand this form
but i wouldd say on server side in java when use use instruction

<menuitem use="menuitemclass" ...

java (not in fonction)

import ...menuitem;
class menuitemclass extends menuitem{
onClick(){
}
}

how implement evenlistener and event ?

thanks


link publish delete flag offensive edit

answered 2006-03-29 15:16:45 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3657847

By: nobody

Implement com.potix.zk.ui.event.EventListener and register it with Component.addEventListener.

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: 2006-03-08 15:36:28 +0800

Seen: 3,495 times

Last updated: Mar 29 '06

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