How to Select a Different Scripting Language"
From Documentation
Maya001122 (talk | contribs) m (Created page with '{{ZKDevelopersGuidePageHeader}} A page could have scripts in multiple different scripting language. <source lang="xml" > <button onClick="javascript:do_something_in_js()"/> <zs…') |
m (correct highlight (via JWB)) |
||
Line 10: | Line 10: | ||
</source> | </source> | ||
− | If the scripting language is omitted, Java is assumed. If you'd like to change the default scripting language, use the < | + | If the scripting language is omitted, Java is assumed. If you'd like to change the default scripting language, use the <code>page</code> directive as follows. |
<source lang="xml" > | <source lang="xml" > |
Latest revision as of 10:35, 19 January 2022
This documentation is for an older version of ZK. For the latest one, please click here.
A page could have scripts in multiple different scripting language.
<button onClick="javascript:do_something_in_js()"/>
<zscript language="groovy">
do_something_in_Groovy();
</zscript>
If the scripting language is omitted, Java is assumed. If you'd like to change the default scripting language, use the page
directive as follows.
<?page zscriptLanguage="Groovy"?>
<zscript>
def name = "Hello World!";
</zscript>