Write Java code in ZUML

From Documentation
Revision as of 10:38, 19 January 2022 by Hawk (talk | contribs) (correct highlight (via JWB))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


For fast prototyping, you can embed codes in ZUML page. By default, it's java. Keep in mind, it's simply java but interpreted by Beanshell. Therefore you can define variables, methods, event class inside zscript. Please refer to Zscript, java, EL for some useful examples about zscript.

There are two ways to write zscript. First, inside <zscript></zscript>:

<zscript>
//inside is zscript
//you can declare variable, function, and even Java class here.
</zscript>

Second, inside event handler.

<button onClick='alert("event handler for onXXX inside ZUML is also zscript")'/>



Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.