-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.8.0-HF03
-
Component/s: Layouts & Widgets
-
Tags:
So I want to concatenate first/last name in a column of a content view:
- I add Generic widget.
- Of type is "text"
- I add a field and put this expression:
#{layoutValue.data.person.first_name} #{layoutValue.data.person.last_name}
So, basically: one EL, a space, then another EL
An error thrown on the server:
Caused by: javax.el.ELException: Error Parsing: #{widget.properties.localize ? messages[layoutValue.data.person.firstName} #{layoutValue.data.person.lastName] : layoutValue.data.person.firstName} #{layoutValue.data.person.lastName} . . . Caused by: org.jboss.el.parser.ParseException: Encountered "}" at line 1, column 66. Was expecting one of:
Workaround: use the Java concat() String method:
#{layoutValue.data.person.first_name.concat(" ").concat(layoutValue.data.person.last_name)}