I am using JSF views (Facelets, MyFaces and Tomahawk) rendered under SWF 2.
I have a 'clear' button on a page, and I want that button to clear the form fields (without validating the input).
This was easily doable in pure JSF, by setting the immediate attribute to true (on the commandButton) and calling JSF's renderResponse().
I am now trying to do the same thing under WebFlow (2.0.6), but can't get it to work.
Here are some snippets from my code:
<t:commandButton styleClass="btnDesign" action="effacerGlobal" value="Effacer"/>
and the "effacerBloc(...)" method simply clears fields from the 'criteres' object.
<view-state id="INDIVIDU" view="rechercheClient.xhtml">
<var name="criteres" class="gouv.ctq.sim.dto.client.CriteresClient115" />
<transition on="effacerGlobal" to="INDIVIDU">
<evaluate expression="rechercheClient.effacerBloc(criteres)" />
<render fragments="whateverform" />
It seems to work, since the view is effectively rendered with empty fields when I set the 'immediate' attribute to false on the commandLink (but then the fields are converted/validated, and I don't want that...)
I am looking for a way to render an empty form again without validating any of the fields. I tried adding a fragment to the view, and using a <render> tag in the transition, but it didn't work.
Thanks for your help!