EL Expressions

From Documentation

EL Expressions

The syntax of an EL expressions is ${expr}. For example,

 <element attr1="${bean.property}".../>
 <another-element>${3+counter} is ${empty map}</another-element>

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 as a Boolean object.

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

Associate with Java

There are several ways to associate Java objects with EL expressions.

  1. Implement a variable resolver (VariableResolver) and specify it with the variable-resolver directive.
  2. Return the object in a static method and specify it in the xel-method
  3. Declare multiple static methods in a taglib and declare it in taglib
  4. Construct them in zscript

Here is the detailed information for each feature. For introductory, please refer to ZK Developer's Reference.

Last Update : 2022/01/19

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