This content has been marked as final.
Show 3 replies
-
1. Re: richfaces cache of table model: how to avoid it?
nbelaevski Jan 12, 2009 8:48 PM (in response to dmitri.ilyin)Hello Dmitri,
Here is the excerpt from UIExtendedDataTable class code:/** * Original version of this method is defined in * {@link org.ajax4jsf.component.UIDataAdaptor} and is called before * RENDER_RESPONSE phase. In that version data model is reseted which causes * need to sort and filter every time component is rendered. */ // @Override protected void resetDataModel() { // Do not reset only for ExtendedTableDataModel model if (!(getDataModel() instanceof ExtendedTableDataModel<?>)) { super.resetDataModel(); } }
As I can see there's org.richfaces.model.ExtendedTableDataModel#reset() method. Maybe calling it will help? -
2. Re: richfaces cache of table model: how to avoid it?
dmitri.ilyin Jan 14, 2009 2:29 PM (in response to dmitri.ilyin)Hi,
thanks.
We have found a workaround. But i think this problem should have a general solution.
We have to delete a row. For that i have placed commonadButton in the row. In the apply request the table model is read in order to decode request values and find out which row is to delete.
After the model is read first time it is cached. After that the model is changed in the action method (the row is deleted), but it is too late. Our workaround is to recreate tablemodel after it is changed in the action method. But it seems to me to be not the best solution.
ragards
Dmitri -
3. Re: richfaces cache of table model: how to avoid it?
ilya_shaikovsky Jan 15, 2009 10:09 AM (in response to dmitri.ilyin)I've forwarded your question to ExtendedTable authors. Thanks again for your efforts.