access UI component by ID

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


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


zscript can access UI component by ID, in the following example,

<window id="win_1">	
	<zscript><![CDATA[  
		win_1.title="given by zscript";				
	]]>
	</zscript>	
</window>

the result will be:

given by zscript

To access ui component in java code, you can use Path.getComponent() to obtain the mapping java object.

Window win = (Window)Path.getComponent("/win_1");
win.setTitle("given by java");



Last Update : 2022/01/19

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