Hello !
I would like to get some advices from the council of the wises
I have the following backing bean containing a list (ListDataModel):
It is displayed in the
JSP with h:dataTable :
in faces-config.xml:
The problem is that when I try to serialize the HttpSession (for several reasons, one being I want to measure its size), I get a java.io.NotSerializableException on the attribute corresponding to the JSP with my list.
This makes sense as in the specs, DataModel is not marked as Serializable.
But
JSF seems to save the datamodel in the view state of the page, which should not be (?).
Is there a way to do this and have the session attribute serializable?
One solution would be to inherit from ListDataModel and mark it Serializable.
Another would be (?) to change the backing bean property to:
(I tried this one, but it seems to fail)
Any another idea? Any best practice concerning DataModel, datatables and serialization?