Define class and methods in zscript
From Documentation
Revision as of 04:05, 15 July 2010 by Maya001122 (talk | contribs) (Created page with '{{ZKDevelopersGuidePageHeader}} Thanks to the power of BeanShell, the implementation of Java classes can be done in zscript as follows. <source lang="xml" > <zscript> publi…')
This documentation is for an older version of ZK. For the latest one, please click here.
Thanks to the power of BeanShell, the implementation of Java classes can be done in zscript as follows.
<zscript>
public class MyWindow extends Window {
}
</zscript>
<window use="MyWindow"/>
And you can define methods in zscript
<window>
<zscript><![CDATA[
public void sayHello(){
alert("hello");
}
]]>
</zscript>
<button label="Say Hello!" onClick="sayHello()" />
</window>