Distinguish zscript from EL

From Documentation

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

Keep in mind, EL is enclosed by ${}.

${self.label} is EL.

	<button label="ok" id="${self.label}"/>

alert(self.label) is not EL, it's a piece of zscript

	<button label="ok" onClick='alert(self.label)'/>		

Although they both look alike, but EL and zscript have different life cycle, EL is not available at certain phase. Therefore in some cases, you can't use EL but zscript.

	<!-- It's wrong, for java don't accept syntax as ${}-->
	<button label="ok" onClick='alert(${self.label})'/>		

Last Update : 2022/01/19

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