@ -276,7 +276,7 @@ String name = (String) exp.getValue(tesla);
<programlisting language= "java" > Expression exp = parser.parseExpression("name == 'Nikola Tesla'");
<programlisting language= "java" > Expression exp = parser.parseExpression("name == 'Nikola Tesla'");
boolean result = exp.getValue(context, Boolean.class); // evaluates to true</programlisting>
boolean result = exp.getValue(context, Boolean.class); // evaluates to true</programlisting>
<section >
<section id= "expressions-evaluation-context" >
<title > The EvaluationContext interface</title>
<title > The EvaluationContext interface</title>
<para > The interface <interfacename > EvaluationContext</interfacename> is
<para > The interface <interfacename > EvaluationContext</interfacename> is
@ -305,7 +305,7 @@ boolean result = exp.getValue(context, Boolean.class); // evaluates to true</pr
expressions. Please refer to the JavaDoc of these classes for more
expressions. Please refer to the JavaDoc of these classes for more
details.</para>
details.</para>
<section >
<section id= "expressions-type-conversion" >
<title > Type Conversion</title>
<title > Type Conversion</title>
<para > By default SpEL uses the conversion service available in Spring
<para > By default SpEL uses the conversion service available in Spring
@ -513,7 +513,7 @@ Object nullValue = parser.parseExpression("null").getValue();
Double.parseDouble().</para>
Double.parseDouble().</para>
</section>
</section>
<section >
<section id= "expressions-properties-arrays" >
<title > Properties, Arrays, Lists, Maps, Indexers</title>
<title > Properties, Arrays, Lists, Maps, Indexers</title>
<para > Navigating with property references is easy, just use a period to
<para > Navigating with property references is easy, just use a period to
@ -575,7 +575,7 @@ parser.parseExpression("Officers['advisors'][0].PlaceOfBirth.Country").setValue(
</programlisting>
</programlisting>
</section>
</section>
<section >
<section id= "expressions-inline-lists" >
<title > Inline lists</title>
<title > Inline lists</title>
<para > Lists can be expressed directly in an expression using {} notation.
<para > Lists can be expressed directly in an expression using {} notation.
@ -592,7 +592,7 @@ List listOfLists = (List) parser.parseExpression("{{'a','b'},{'x','y'}}").getVal
to represent the expression, rather than building a new list on each evaluation.</para>
to represent the expression, rather than building a new list on each evaluation.</para>
</section>
</section>
<section >
<section id= "expressions-array-construction" >
<title > Array construction</title>
<title > Array construction</title>
<para > Arrays can be built using the familiar Java syntax, optionally
<para > Arrays can be built using the familiar Java syntax, optionally
@ -611,7 +611,7 @@ int[][] numbers3 = (int[][]) parser.parseExpression("new int[4][5]").getValue(co
a multi-dimensional array.</para>
a multi-dimensional array.</para>
</section>
</section>
<section >
<section id= "expressions-methods" >
<title > Methods</title>
<title > Methods</title>
<para > Methods are invoked using typical Java programming syntax. You may
<para > Methods are invoked using typical Java programming syntax. You may
@ -625,10 +625,10 @@ boolean isMember = parser.parseExpression("isMember('Mihajlo Pupin')").getValue(
Boolean.class);</programlisting>
Boolean.class);</programlisting>
</section>
</section>
<section >
<section id= "expressions-operators" >
<title > Operators</title>
<title > Operators</title>
<section >
<section id= "expressions-operators-relational" >
<title > Relational operators</title>
<title > Relational operators</title>
<para > The relational operators; equal, not equal, less than, less than
<para > The relational operators; equal, not equal, less than, less than
@ -666,7 +666,7 @@ boolean falseValue =
These are case insensitive.</para>
These are case insensitive.</para>
</section>
</section>
<section >
<section id= "expressions-operators-logical" >
<title > Logical operators</title>
<title > Logical operators</title>
<para > The logical operators that are supported are and, or, and not.
<para > The logical operators that are supported are and, or, and not.
@ -701,7 +701,7 @@ String expression = "isMember('Nikola Tesla') and !isMember('Mihajlo Pupin')";
boolean falseValue = parser.parseExpression(expression).getValue(societyContext, Boolean.class);</programlisting> </para>
boolean falseValue = parser.parseExpression(expression).getValue(societyContext, Boolean.class);</programlisting> </para>
</section>
</section>
<section >
<section id= "expressions-operators-mathematical" >
<title > Mathematical operators</title>
<title > Mathematical operators</title>
<para > The addition operator can be used on numbers, strings and dates.
<para > The addition operator can be used on numbers, strings and dates.
@ -742,7 +742,7 @@ int minusTwentyOne = parser.parseExpression("1+2-3*8").getValue(Integer.class);
</section>
</section>
</section>
</section>
<section >
<section id= "expressions-assignment" >
<title > Assignment</title>
<title > Assignment</title>
<para > Setting of a property is done by using the assignment operator.
<para > Setting of a property is done by using the assignment operator.
@ -764,7 +764,7 @@ String aleks = parser.parseExpression("Name = 'Alexandar Seovic'").getValue(inve
<para > </para>
<para > </para>
</section>
</section>
<section >
<section id= "expressions-types" >
<title > Types</title>
<title > Types</title>
<para > The special 'T' operator can be used to specify an instance of
<para > The special 'T' operator can be used to specify an instance of
@ -786,7 +786,7 @@ boolean trueValue =
</programlisting>
</programlisting>
</section>
</section>
<section >
<section id= "expressions-constrcutors" >
<title > Constructors</title>
<title > Constructors</title>
<para > Constructors can be invoked using the new operator. The fully
<para > Constructors can be invoked using the new operator. The fully
@ -820,7 +820,7 @@ parser.parseExpression("Name = #newName").getValue(context);
System.out.println(tesla.getName()) // "Mike Tesla"</programlisting>
System.out.println(tesla.getName()) // "Mike Tesla"</programlisting>
<section >
<section id= "expressions-this-root" >
<title > The #this and #root variables</title>
<title > The #this and #root variables</title>
<para > The variable #this is always defined and refers to the current
<para > The variable #this is always defined and refers to the current
@ -847,7 +847,7 @@ List<Integer> primesGreaterThanTen =
</section>
</section>
<!--
<!--
<section >
<section id= "expressions-root" >
<title > The #root variable</title>
<title > The #root variable</title>
<para > The variable #root is always defined and refers to the
<para > The variable #root is always defined and refers to the
@ -905,7 +905,7 @@ String helloWorldReversed =
parser.parseExpression("#reverseString('hello')").getValue(context, String.class);</programlisting>
parser.parseExpression("#reverseString('hello')").getValue(context, String.class);</programlisting>
</section>
</section>
<section >
<section id= "expressions-bean-references" >
<title > Bean references</title>
<title > Bean references</title>
<para > If the evaluation context has been configured with a bean resolver it is possible to
<para > If the evaluation context has been configured with a bean resolver it is possible to
lookup beans from an expression using the (@) symbol.
lookup beans from an expression using the (@) symbol.
@ -918,7 +918,7 @@ context.setBeanResolver(new MyBeanResolver());
Object bean = parser.parseExpression("@foo").getValue(context);</programlisting>
Object bean = parser.parseExpression("@foo").getValue(context);</programlisting>
</section>
</section>
<section >
<section id= "expressions-operator-ternary" >
<title > Ternary Operator (If-Then-Else)</title>
<title > Ternary Operator (If-Then-Else)</title>
<para > You can use the ternary operator for performing if-then-else
<para > You can use the ternary operator for performing if-then-else
@ -944,7 +944,7 @@ String queryResultString =
shorter syntax for the ternary operator.</para>
shorter syntax for the ternary operator.</para>
</section>
</section>
<section >
<section id= "expressions-operator-elvis" >
<title > The Elvis Operator</title>
<title > The Elvis Operator</title>
<para > The Elvis operator is a shortening of the ternary operator syntax
<para > The Elvis operator is a shortening of the ternary operator syntax
@ -985,7 +985,7 @@ name = parser.parseExpression("Name?:'Elvis Presley'").getValue(context, String.
System.out.println(name); // Elvis Presley</programlisting>
System.out.println(name); // Elvis Presley</programlisting>
</section>
</section>
<section >
<section id= "expressions-operator-safe-navigation" >
<title > Safe Navigation operator</title>
<title > Safe Navigation operator</title>
<para > The Safe Navigation operator is used to avoid a
<para > The Safe Navigation operator is used to avoid a
@ -1022,7 +1022,7 @@ System.out.println(city); // null - does not throw NullPointerException!!!</prog
</note>
</note>
</section>
</section>
<section >
<section id= "expressions-collection-selection" >
<title > Collection Selection</title>
<title > Collection Selection</title>
<para > Selection is a powerful expression language feature that allows you
<para > Selection is a powerful expression language feature that allows you
@ -1057,7 +1057,7 @@ System.out.println(city); // null - does not throw NullPointerException!!!</prog
<literal > $[...]</literal> .</para>
<literal > $[...]</literal> .</para>
</section>
</section>
<section >
<section id= "expressions-collection-projection" >
<title > Collection Projection</title>
<title > Collection Projection</title>
<para > Projection allows a collection to drive the evaluation of a
<para > Projection allows a collection to drive the evaluation of a
@ -1078,7 +1078,7 @@ List placesOfBirth = (List)parser.parseExpression("Members.![placeOfBirth.city]"
projection expression against each map entry.</para>
projection expression against each map entry.</para>
</section>
</section>
<section >
<section id= "expressions-templating" >
<title > Expression templating</title>
<title > Expression templating</title>
<para > Expression templates allow a mixing of literal text with one or
<para > Expression templates allow a mixing of literal text with one or