Use zscript to initialize"
From Documentation
Maya001122 (talk | contribs) m (Created page with '{{ZKDevelopersGuidePageHeader}} In Page Initial Phase, ZK processes the processing instructions, called <tt>init</tt>. Use <tt>zscript</tt> to init the page,simply specify a f…') |
m (correct highlight (via JWB)) |
||
Line 1: | Line 1: | ||
{{ZKDevelopersGuidePageHeader}} | {{ZKDevelopersGuidePageHeader}} | ||
− | In Page Initial Phase, ZK processes the processing instructions, called < | + | In Page Initial Phase, ZK processes the processing instructions, called <code>init</code>. |
− | Use < | + | Use <code>zscript</code> to init the page,simply specify a file containing the scripting codes with the zscript attribute, as follows. Then, the file will be interpreted at the Page Initial phase. |
For example: | For example: | ||
Line 12: | Line 12: | ||
Notice that the page is not yet attached to the desktop when the Page Initial phase executes. | Notice that the page is not yet attached to the desktop when the Page Initial phase executes. | ||
− | Use java to init the page, simply specify a class with class attribute, an instance of the specified class is constructed, and then its < | + | Use java to init the page, simply specify a class with class attribute, an instance of the specified class is constructed, and then its <code>doInit</code> method is called. |
For example: | For example: |
Latest revision as of 10:41, 19 January 2022
This documentation is for an older version of ZK. For the latest one, please click here.
In Page Initial Phase, ZK processes the processing instructions, called init
.
Use zscript
to init the page,simply specify a file containing the scripting codes with the zscript attribute, as follows. Then, the file will be interpreted at the Page Initial phase.
For example:
<?init zscript="/my/init.zs"?>
Notice that the page is not yet attached to the desktop when the Page Initial phase executes.
Use java to init the page, simply specify a class with class attribute, an instance of the specified class is constructed, and then its doInit
method is called.
For example:
<?init class="MyInit"?>