I've been experimenting with the Struts + Faces integration library and have hit one puzzling behavior using a <h:commandButton>.executing an "action" in a form-bean

If I have a page with a StrutsFaces form <s:form action="whatever"> and that's associated with a Form Bean "foo" (session scope)
So I can have a text field bound to an element of the foo actionForm
<h:inputText id="name" value="#{foo.name}"/>
This works as expected.
If I then have a commandButton thus:
<h:commandButton id="setDefault" action="#{foo.setDefault}" value="Set Default value" immediate="true"/>
where setDefault() is changing the value of the name attribute in the foo bean


The method setDefault() in the foo ActionForm class executes in response to the button, but the page does not refresh with the new value of foo.name. In debug the getter in the Form Bean is never called .

If I do the same thing in a vanilla faces page with a "conventional" backing bean defined in my faces-config the value of name would refresh .

So is there some restriction here or difference in lifecycle with respect to Form-Bean, or should we not be overloading ActionForms with commandButton actions?

--

Regards

Duncan Mills



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to