Revision history [back]

click to hide/show revision 1
initial version

answered 2010-02-05 21:10:00 +0800

tmillsclare gravatar image tmillsclare

Hey Dastultz,

I have investigated your problem and can reveal that the execution cycle is indeed correct.

In a general cycle, ZK receives the validate command and then issues an uses the EventThread to take care of the processing and return the result.

There is an easy way for you to handle this by implementing ExecutionInit and ExecutionCleanup. These operate either side of commands. However, they are run before and after any commands, so if you click a button and check then validate you get the following output:

EventCycleCleanup.init() - on http-8080-2
Constraint.validate() on http-8080-2
Button.onClick() on Thread-13
EventCycleCleanup.cleanup() - on http-8080-2

or

EventCycleCleanup.init() - on http-8080-2
Constraint.validate() on http-8080-2
EventCycleCleanup.cleanup() - on http-8080-2

EventCycleCleanup.init() - on http-8080-2
Button.onClick() on Thread-13
EventCycleCleanup.cleanup() - on http-8080-2

The second only happens when something delays one of the calls, eg. debugging. What I would recommend is you get your data connection in the validate method, perform the validation and then clean it up in the cleanup() method if it is open.

I hope this helps and please let me know if you have any other questions.

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