Hi Sushma,
I am getting the same problem as you have been experincing that navigation keeps returning to the same page.
Below are some code samples for reference. Also, I put some logs to capture the behavior.
The navigation works and sometimes doesn't work depending on the certain situation as you have describe above.
This is my observation of navigation not working from looking in the logs. Everytime I hit the link and it returns to the same page. I don't see the method "viewEditAction" being called by
JSF. Instead it reconstruct the same page again, so I will see the constructor of "SearchRequestFaces" being called again.
I assume one thing that there could be exception or error in JSF that it keeps the previous request in the Faces Context for that particular session. It might not work on my session but it might work on other session.
FOR QUICK FIX, I usually close all my IE to force to get a new session and to restart the app server.
I hope this help. I am still looking for the answer for this navigation not working. I need look in the FacesContext to see what is happening there. I will let you know if I find something informative.
Thanks,
Ron
<!--
jsp page -->
<h:column>
<h:commandLink id="editSearchs" action="#{clientSearch.viewEditAction}" >
<h:outputText value="View/Edit" />
<f:param name="idAcct" value="#{data.idAcct}"/>
</h:commandLink>
</h:column>
<!-- SearchRequestFaces.java -->
public SearchRequestFaces() {
log.debug("SearchRequestFaces => initiliazed for request");
}
public
String viewEditAction() {
log.debug("********************************");
String idAccount = DataTypeConverter.getFacesParamValue(this.fc, "idAcct");
log.debug("VIEW EDIT ACTION => setting the current account with " + idAccount + " or " + client.getAccountFaces().getIdAcct());
client.setCurrentAccount(Integer.parseInt(idAccount));
return "ViewEdit";
}
<!-- managed bean -->
<managed-bean>
<managed-bean-name>clientSearch</managed-bean-name>
<managed-bean-class> com.espeed.compliance.faces.client.SearchRequestFaces
</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<!-- navigation -->
<navigation-case>
<from-outcome>Search</from-outcome>
<to-view-id>/jsf/client/SearchAccount.jsp</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>ViewEdit</from-outcome>
<to-view-id>/jsf/client/EditViewAccount.jsp
</to-view-id>
<redirect/>
</navigation-case>