More EL Examples"

From Documentation
(Created page with '{{ZKDevelopersGuidePageHeader}} <source lang="xml" > ${empty myMap} ${myMap[entry]} ${3+counter} </source> Tip: <tt>empty</tt> is an operator used to test whether a map, a col…')
 
m (correct highlight (via JWB))
 
Line 8: Line 8:
 
</source>
 
</source>
  
Tip: <tt>empty</tt> is an operator used to test whether a map, a collection, an array or a string is null or empty.
+
Tip: <code>empty</code> is an operator used to test whether a map, a collection, an array or a string is null or empty.
  
Tip: <tt>myMap[entry]</tt> is a way to access an element of a map. In other words, it is the same as <tt>myMap.get(entry)</tt> in Java.
+
Tip: <code>myMap[entry]</code> is a way to access an element of a map. In other words, it is the same as <code>myMap.get(entry)</code> in Java.
  
 
When an EL expression is used as an attribute value, it could return any kind of objects as long as the component accepts it. For example, the following expression will be evaluated to a Boolean object.
 
When an EL expression is used as an attribute value, it could return any kind of objects as long as the component accepts it. For example, the following expression will be evaluated to a Boolean object.
Line 18: Line 18:
 
</source>
 
</source>
  
Standard implicit objects, such as <tt>param</tt> and <tt>requestScope</tt>, and ZK implicit objects, such as <tt>self</tt> and <tt>page</tt>, are supported to simplify the use.
+
Standard implicit objects, such as <code>param</code> and <code>requestScope</code>, and ZK implicit objects, such as <code>self</code> and <code>page</code>, are supported to simplify the use.
  
 
<source lang="xml" >
 
<source lang="xml" >

Latest revision as of 10:36, 19 January 2022

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


${empty myMap}
${myMap[entry]}
${3+counter}

Tip: empty is an operator used to test whether a map, a collection, an array or a string is null or empty.

Tip: myMap[entry] is a way to access an element of a map. In other words, it is the same as myMap.get(entry) in Java.

When an EL expression is used as an attribute value, it could return any kind of objects as long as the component accepts it. For example, the following expression will be evaluated to a Boolean object.

<window if="${some > 10}">

Standard implicit objects, such as param and requestScope, and ZK implicit objects, such as self and page, are supported to simplify the use.

<textbox value="${param.who} does ${param.what}"/>



Last Update : 2022/01/19

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