Trying to navigation from Page A to Page B. While navigating to page B passing parameter using configurableNavigationHandler like below
public void navigate(String outcome) {
FacesContext fc = FacesContext.getCurrentInstance();
ConfigurableNavigationHandler nav = (ConfigurableNavigationHandler) fc
.getApplication().getNavigationHandler();
nav.performNavigation(outcome+"?faces-redirect=true&includeViewParams=true&oldPage=hello");
}
In Page B when I click on back it has to retrieve the parameter value and navigate the user to the respective page.But getting null value while retrieving the request parameter.
public String navigateToOldPage() {
FacesContext fc = FacesContext.getCurrentInstance();
String oldPage = fc.getExternalContext().getRequestParameterMap().get("oldPage");
return oldPage;
}
Could anyone please suggest me?