You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Gerald Müllan <bi...@gmail.com> on 2006/12/05 16:00:17 UTC
Re: getters/setters ordering
Hi,
you can also put the whole bean in t:saveState. This may prevent you
from running into these problems.
cheers,
Gerald
On 12/5/06, Renzo Tomaselli <re...@tecnotp.it> wrote:
>
> Hi all, I use saveState component to transmit persistent values across
> requests. This implies that a proper bean setter is invoked while restoring
> a view. Now, it happens that the restored value might influence other tags,
> both in terms of value model and rendering.
> The question is: can I count on a specific order in getting all setters
> called, so that for instance I can force saveState restoring to occur before
> all other setters ? Does it depend on page layout positioning ?
> Btw, this is a generic issue concerning alla setters in a bean.
> Thanks -- Renzo
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
Re: getters/setters ordering
Posted by Renzo Tomaselli <re...@tecnotp.it>.
Gerald, in my case things are a bit more complex. I have a dataTable and
I don't want to save the entire state to avoid overloading
communications. But I have columns which are rendered conditionally,
depending on a checkbox located in the table header. I discovered that
the checkbox setter is called after getters located inside x:columns
component, and those getters are influenced by the checkbox status. So I
need to save the checkbox status inside a saveState component, located
before the table. That's why asked.
Thanks -- Renzo
Gerald Müllan wrote:
> Hi,
>
> you can also put the whole bean in t:saveState. This may prevent you
> from running into these problems.
>
> cheers,
>
> Gerald
>
> On 12/5/06, Renzo Tomaselli <re...@tecnotp.it> wrote:
>>
>> Hi all, I use saveState component to transmit persistent values across
>> requests. This implies that a proper bean setter is invoked while
>> restoring
>> a view. Now, it happens that the restored value might influence other
>> tags,
>> both in terms of value model and rendering.
>> The question is: can I count on a specific order in getting all setters
>> called, so that for instance I can force saveState restoring to occur
>> before
>> all other setters ? Does it depend on page layout positioning ?
>> Btw, this is a generic issue concerning alla setters in a bean.
>> Thanks -- Renzo
>>
>>
>
>