0

Help to execute a java class when locad index.zul

asked 2009-07-19 11:19:21 +0800

kingsz1 gravatar image kingsz1
81 1 3

Hello all. i am new in zk and java. I got the code to click a button to exectue a java class. but I want to execute a java class doing something when load the index.zul, such as checking the setting, or read a xml file for system config.

How to do this? please give code example or link. thanks for any help.

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2009-07-19 12:50:56 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

read Documentation/smalltalks or search forum for GenericForwardComposer

with it you have access i.e. to following where indexWindow is your window component id
in your index.zul

 onCreate$indexWindow(Event event){
  // do your stuff here
  }

Stephan

link publish delete flag offensive edit

answered 2009-07-20 18:25:57 +0800

windeyu gravatar image windeyu flag of United States
288 3

Depending on your need, you can execute java code when the page is initialized using the init tag:

<?init class="MyInit"?>

You can find more details in the Developer's Guide.

link publish delete flag offensive edit

answered 2009-07-21 11:32:29 +0800

kingsz1 gravatar image kingsz1
81 1 3

Thank you terrytornado and windeyu. I tried the "onCreate$", it works.
Thanks a lot.

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: 2009-07-19 11:19:21 +0800

Seen: 205 times

Last updated: Jul 21 '09

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