Developer Tools
JDeveloper
JSF 1.2 supports the Java EE 5 unified expression language (EL), which unifies the JSF and JSP expression languages.
You use EL to create the bindings from component tags on JSF pages to properties (or other values) or methods on classes within the application. Method expressions provide a way to execute methods. Value expressions provide values for attributes on a component.
The syntax for value expressions follows that same syntax used by JSP 2.1 expression language, with the following exception: The delimiters must be #{ and }. JSF EL expressions now support EL functions.
Examples of value expressions follow:
#{foo}
#{foo.bar}
#{foo.bar.baz}
#{foo[bar]}
#{foo["bar"]}
#{foo[3]}
#{foo[3].bar}
#{foo.bar[3]}
#{foo.bar == "Hello World"}
#{(foo.bar) / 5 * 3}
Offer Valid from #{offer.validFromDate} to {offer.validToDate}
Method expressions must use one of the following patterns:
#{expression.value}
#{expression[value]}
The expression can be any JSF EL expression as described above, in Value Expression Syntax. The value must be an identifier that matches a method name on the object in the expression.
Expression language provides the following operators, in addition to the
. and
[] operators:
+,
- (binary),
*,
/ and
div,
% and
mod,
- (unary)
and,
&&,
or,
||,
not,
!
==,
eq,
!=,
ne,
<,
lt,
>,
gt,
ge,
>=,
le,
<=
boolean,
string,
integer, or floating point literals.
empty operator is a prefix operation that can be used to determine whether a value is
null or empty.
A ? B : C. Evaluate
B or
C, depending on the result of the evaluation of
A.
Copyright © 1997, 2009, Oracle. All rights reserved.