-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5036739
By: brendan4linux
Hi,
I am trying to follow the server push guide at:
http://zkoss.org/smalltalks/zk3.0rc/zk3.0rc.dsp
In a zscript file (included from a zul page), I am calling a new Thread (class from the guide):
desktop.enableServerPush(true);
MyThread thread = new MyThread(hbox);
mythread.start();
In my Thread class, I get the following error, however
Exception in thread "Thread-35" java.lang.IllegalStateException: Components can be accessed only in event listener
This also happens when trying to run the demo on that same web page. Am I doing something out of order/wrong? I run Executions.activate(_desktop) from within the 'MyThread' class.
Thanks,
Brendan
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5037129
By: jebberwocky
Refer to this thread https://sourceforge.net/forum/message.php?msg_id=4573498
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5037239
By: brendan4linux
Sorry, i'm new to ZK - I'm not sure what you mean? Is there a possible issue with the code I posted above? I enabled server push on the desktop before calling
start() on the new thread, as I have seen in many examples, but it still throws that error, whether with the demo code or my code.
Thanks,
B
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=5039074
By: robbiecheng
Hi Brendan,
Please make sure you don't do any modification to ZK components after invoking Executions.deactivate(_desktop); //you cannot access ZK components from now on
And take a look at this example,
http://zkoss.org/doc/devguide/ch05s04s02.html
/robbie
Asked: 2008-06-16 22:05:59 +0800
Seen: 195 times
Last updated: Jun 18 '08