[EMAIL PROTECTED] wrote:
Hello again.

I have little question about <t:saveState>
I have following control in my edit form:

<h:commandLink action="#{CategoryBean.delete}" value="Delete"
styleClass="dl" rendered="#{CategoryBean.editmode}" />

As you can see, it uses rendered attribute and rendered only if someone
editing item. Because backing bean is request scoped i tried to use
<t:saveState> to preserve state of bean and added to beginning of the form:
<t:saveState value="#{CategoryBean} id="save1" />

And it seem worked, but if someone submits form with validation errors,
after form reloads that "Delete" button stops working again.
Any clue ? Thanx.

Yes, t:saveState will save the data even when validation fails. The "saving" process occurs when the JSF component tree is saved, and that always occurs at the end of each request.

Your problem must be something else...

By the way, if all you want to save is that one property from CategoryBean, then you should probably just save that, ie
 <t:saveState value="#{CategoryBean.editmode}"/>
rather than the whole bean.

Regards,

Simon

Reply via email to