For the most part, OGNL's operators are borrowed from Java and work similarly to Java's operators. See the OGNL Reference for a complete discussion. Here we describe OGNL operators that are not in Java, or that are different from Java.
The comma (,) or sequence operator. This operator is borrowed from C. The comma is used to separate two independent expressions. The value of the second of these expressions is the value of the comma expression. Here is an example:
ensureLoaded(), name
When this expression is evaluated, the ensureLoaded method is called (presumably to make sure that all parts of the object are in memory), then the name property is retrieved (if getting the value) or replaced (if setting).
List construction with curly braces ({}). You can create a list in-line by enclosing the values in curly braces, as in this example:
{ null, true, false }
The in
operator (and not in
, its negation). This is a containment test, to see if a value is in a collection. For example,
name in {null,"Untitled"} || name
See the OGNL reference for a full list of operations