views:

37

answers:

1

We have two forms where we need to pass values from one to the other. We pass the parameters successfully, but the second page never renders in the browser. The browser just hangs and the request never completes. If we add the redirect rule to faces-config.xml, the page renders but the parameter value is reset to null.

Here's our navigation rule in faces-config:

   <navigation-rule>
    <from-view-id>/activeApps.xhtml</from-view-id>
        <from-outcome>viewApp</from-outcome>
        <to-view-id>/viewApplications.xhtml</to-view-id>
    </navigation-case>
</navigation-rule>

This is how we pass the parameter from the first form (activeApps.xhtml):

<rich:menuItem ajaxSingle="true" value="View Application Form" action="#{Form1.viewApp}">
 <a4j:actionparam name="selectedApplicationId"value="{applicationId}" assignTo="#{Form2.applicationIdString}"/>
</rich:menuItem>

Any help is appreciated.

+2  A: 

If you want to change from destination page, you need to fire a real HTTP request, not an Ajax request.

BalusC
I tried changing the rich:contextMenu to submitMode="server" instead of submitMode="ajax", but it then just refreshes and stays on the same page
droidy
Make sure that the menuItems aren't overwriting submitMode. From the docs: 'Sets the submission mode for all menu items of the menu except those where this attribute redefined. Possible value are "ajax","server", "none". Default value is "server".'
Naganalf