You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Alessandro Polverini <al...@nibbles.it> on 2005/02/01 12:21:04 UTC

Re: [jira] Created: (MYFACES-98) Allow x:dataTable to store its data model in the component tree

On Tue, 2005-02-01 at 09:25 +0100, Martin Marinschek wrote:
> Exactly, use the preserveDataModel attribute and you are all set!
> 
> Manfred had a very hard time implementing that one, as far as I remember ;)

Hello Martin,
I tried to set preserveDataModel to true to avoid the x:saveState
declaration, but this would not work (in my case, at least).

I try to explain my situation to better understand the behaviour: I have
a simple form with some search parameters, when the user submits it, the
backing bean (request scope) is populated with results and I show and
paginate through them using x:dataTable and x:dataScroller.

The only way I found to make it work well is:
- set preserveDataModel to false (or to not put the attribute
completely)
- use a x:saveState on #{bean.results}

Whithout doning this, I can see only the first page of results and every
other action (for example switch to page #2) the datas are lost and no
more rows are displayed.
The problem also occurs if I *both* use saveState and preserveDataModel,
maybe because the partially conflicts in their operation?

So, I deduce that preserveDataModel does not the very same thing of
saveState, and maybe the idea of Sean is useful anyway?

Or maybe preserveDataModel has a bug (or a limitation) and should be
fixed?

I would be interested to better understand this issue.

Thanks,
Alex