Distinguish zscript from EL

From Documentation
Revision as of 07:30, 12 July 2010 by Maya001122 (talk | contribs) (Created page with '{{ZKDevelopersGuidePageHeader}} Keep in mind, EL is enclosed by ${}. <tt>${self.label}</tt> is EL. <source lang="xml" > <window> <button label="ok" id="${self.label}"/> ${o…')
(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.


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

${self.label} is EL.

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

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

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

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.

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



Last Update : 2010/07/12

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