Question

I have a navigation define from one page to another like this.

<h:outputLink id="idLink"  value="Page1.seam" >
    <f:param name="m" value="n103" />
    <f:param name="mss" value="110" />
<h:outputText value="Return to Page 1" />
<a4j:support event="onclick" action="#{beanName.action}" limitToList="true" ignoreDupResponses="true" eventsQueue="que" ajaxSingle="true" immediate="true">
</a4j:support>
</h:outputLink>

The problem is there are sometimes that the view isn't changing to Page1.seam and remain in Page2.seam. Is there anyone who knows better ? Help will be greatly appreciated. Thanks.

Was it helpful?

Solution

This construct makes no sense. Make it a normal link

<h:outputLink value="Page1.seam">
    <f:param name="m" value="n103" />
    <f:param name="mss" value="110" />
    <h:outputText value="Return to Page 1" />
</h:outputLink>

and to invoke an action on opening of the page, use <f:event type="preRenderView"> in the target view instead.

<f:event type="preRenderView" listener="#{beanName.action}" />

See also:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top