Hello,
I have a datatable on my JSP page that displays list
of employees. This datatable has only outputText
components for displaying data. Value binding is
something like:
value="#{employees.listOfEmployees}"
Inside employees bean there is getter for
listOfEmployees:
public List getListOfEmployees() {
return getListFromDatabase();
}
When my page is displayed, this getter will be called
in RENDER_RESPONSE phase. This is expected behaviour,
since my datatable needs to be populated before it is
displayed to the user.
My problem is following:
When I submit this page, getter getListOfEmployees
will be called again in APPLY_REQUEST_VALUES phase,
doing unnecessary database retreival. Why is this
happening? I understand that getters (and setters)
must be called for all properties that needs to be
updated via submitted values, but there is no control
on my JSP that updates value of my listOfEmployees
(only datatable and its outputTexts).
Moreover, listOfEmployees does not have any setter, so
I don't see any reason JSF should do anything with it
inside APPLY_REQUEST_VALUES.
Is there any workaround this problem?
Thank you for any help,
Igor.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com