Use the script directive to embed the code directly. For example,
Alternatively, you could use the script component to embed the code.
Put in a Separate File and Reference it in the ZUML page
Put in a Separate File and Reference it in Language Addon
Then, you could specify the language addon in
<language-config> <addon-uri>/WEB-INF/lang-addon.xml</addon-uri> </language-config>
Make It a WPD File for More Control
For example, you could have a WPD file and make it loaded with the zk package (so it speeds up the loading).