When an h:dataTable or x:dataTable saves it's state, it serializes all the data held in it's value even if preserveDataModel is false.
This is because HtmlDataTable is a subsclass of UIData, and UIData.saveState saves it's value object.
This is a problem if your dataTable displays rows of a large database table because it serializes the all table.
This can cause the server and/or the client to be very slow or to crash.
=> Is it expected that h:dataTable serializes it's value when it saves it's state ?
=> In HtmlDataTable.saveState, shouldn't we call super.setValue(null) before getting super.saveState(context) to avoid this ?
Also, I guess that when preserveDataModel="true", the data is saved twice, because the hidden jsf_tree_64 field gets almost twice as big. But I need to check this more carefully.
Thanks,
Sylvain.
- dataTable generating huge serialized jsf trees Sylvain Vieujot
- Re: dataTable generating huge serialized jsf trees Sean Schofield