On 9/14/06, David Delbecq <[EMAIL PROTECTED]> wrote:
Is it correct to assume a transition from xxx.jsp to the same xxx.jsp,
following a navigation-rule after an action creates a brand new form
(recreation of all components, submitted value are not linked to those
components)
I used this "navigate-to-the-same-page" technique when I couldn't
quickly come up with a useful "public String clear()" action method.
As others have noted, your backing beans providing data must be request-scoped.
Also, you may need to use a <redirect /> rule to thwart any
t:saveState and messages preservation you have on the page.
<navigation-rule>
<description></description>
<from-view-id>/pages/MyPage.xhtml</from-view-id>
<navigation-case>
<from-outcome>clear</from-outcome>
<to-view-id>/pages/MyPage.xhtml</to-view-id>
<redirect />
</navigation-case>
</navigation-rule>
public String clear()
{
return "clear";
}
<h:commandButton
value="Clear"
immediate="true"
action="#{yourBean.clear}">
</h:commandButton>