You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Simon Kitching <sk...@obsidium.com> on 2005/11/28 06:08:26 UTC
Fetching model for read-only tables
Hi,
Currently a UIData's DataModel is fetched (via a value-binding) during
the decode phase, even when the children of the table are all read-only.
This is caused by UIData.processDecodes.
When the data model is fetched from a database this isn't very nice.
What do people think of checking whether there are any input children
before loading the datamodel?
I suspect this check can possibly be done just by seeing if there is any
saved _rowState, as non-input components are all transient and so have
no rowstate.
This *might* be a violation of the spec, though, as non-input child
components of the table won't get processDecodes callbacks.
Thoughts?
Regards,
Simon
Re: Fetching model for read-only tables
Posted by Manfred Geiler <ma...@gmail.com>.
The preserveDataModel option of the x:dataTable should solve your
problem. It makes the table "remember" all values between requests.
Therefore no data fetching necessary during any phase prior to
rendering.
HTH,
Manfred
2005/11/28, Simon Kitching <sk...@obsidium.com>:
> Hi,
>
> Currently a UIData's DataModel is fetched (via a value-binding) during
> the decode phase, even when the children of the table are all read-only.
>
> This is caused by UIData.processDecodes.
>
> When the data model is fetched from a database this isn't very nice.
> What do people think of checking whether there are any input children
> before loading the datamodel?
>
> I suspect this check can possibly be done just by seeing if there is any
> saved _rowState, as non-input components are all transient and so have
> no rowstate.
>
> This *might* be a violation of the spec, though, as non-input child
> components of the table won't get processDecodes callbacks.
>
> Thoughts?
>
> Regards,
>
> Simon
>