1

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.

Tiny
  • 24,933
  • 92
  • 299
  • 571
Ellie Fabrero
  • 781
  • 2
  • 15
  • 40
  • What do you do in beanName.action? Post some code. Do you get any error or logs when it fails? Check the action in your browser. Is he doing a post. You can check with firebug net section and see if and what post is performed when it fails – roel Jun 05 '12 at 09:12
  • can u try using a `` instead of `` – Mango Jun 05 '12 at 09:14
  • @roel - ill look for an error, but this happens at very low chance, so ill further investigate. – Ellie Fabrero Jun 05 '12 at 09:25
  • @Mango - nope does not work. it generates a post. :)) – Ellie Fabrero Jun 05 '12 at 09:25

1 Answers1

3

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:

Community
  • 1
  • 1
BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452