There must be some other reason.   t:saveState works on backing beans,
not on components, so that shouldn't be relevent.

However, if your t:saveState component isn't rendered (or is inside
conditional code like c:if) then it won't be used.


On 2/27/07, Renzo Tomaselli <[EMAIL PROTECTED]> wrote:
Hi, I use t:saveState throughout many components. Usually it is used
together with some visible elements.
Now I tried to use it for saving some configuration parameters, which
might appear as visible components or not, depending on user choice.
I was fairly surprised to notice that when there is no visible
component, the restoring process is skipped altogether (from my debugger).
E.i.:

<ui:component>
    <t:saveState id="selected" value="#{bean.selected}"/>
    <c:if test="#{bean.visible}">
        <t:commandButton id="cancel" text="#{msg['tableConfig.cancel']}"
action="#{bean.cancel}"/>
    ...

in such a case, I assumed that proper saving/restoring of saveState
would occur even when visible == false, e.g. no component was rendered.
But I noticed that in this case, method setSelected() is never called
during restore view.
I use Facelets, and other components in the same page are properly
restored, but all of them have some rendered component.
Would a hidden input all I need to force proper handling of saveState or
is there any other trick to account for ?
Thanks -- Renzo


Reply via email to