I have a Web App that has a datatable where columns that do not have whitespace in the data sort fine, but columns that do have whitespace throw a javax.el.ELException / com.sun.el.parser.ParseException. e.g. Error Parsing: #{employee.Joe Bloggs}

To try to rule out my code I have set up a simpler example similar to https://www.logicbig.com/tutorials/misc/primefaces/data-table.html but the problem still persists

Is this a Primefaces limitation that you can not sort Strings that include whitespace? Or am I missing something?

e.g.

xhtml

<p:dataTable var="employee" value="#{employeeBean.employeeList}">
...
                    
    <p:column headerText="Name" sortBy="#{employee.name}" >
        <h:outputText value="#{employee.name}"/>
    </p:column>
                    
...
</p:dataTable>

Backing Bean

private List<Employee> employeeList = new ArrayList<Employee>(){{
      add(new Employee(1L,"Joe Bloggs","1234","Address"));
      add(new Employee(2L,"Test","1234","Address"));
}};
0

There are 0 best solutions below