I have this line in my jsf page
<h:dataTable value="#{customer.getCustomerList()}"
and in my bean I have
public List<Customer> getCustomerList(){
return customerBo.findAllCustomer();
}
I am using JSF 2.0 with Eclipse Helios with servlet 2.5 and when I validate I am getting
Expression must be a value expression but is a method expression
How can I resolve this issue?
View:
The
valueattribute of yourh:dataTableexpects a value expression, not a method expression. You have to create a property calledcustomerListin your#{customer}managed bean.Refer to the h:dataTable tag documentation