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