Well. I realized that I am near to solve this out and I can get the proper solution yesterday night but you have to check it out again, I have finished the checking previously. Now, the NavigationManager contains the code displayed below. After such type of configurations , I can have as so pseudo from-view-id as I moved into the faces-config and work with them without hardcodding the specific names at any location . So, It is possible to do , to have a another navigation rule for every web site menu block..
Code:
package org.exadel;
import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;
public class NavigationManager extends NavigationHandler {
NavigationHandler _base;
public NavigationManager (NavigationHandler base) {
super();
_base = base;
}
public void handleNavigation(FacesContext fc, String actionMethod, String actionName) {
String action = actionName;
int atPosition = action.indexOf("@");
if (atPosition > -1) {
String extViewId = action.substring(atPosition);
fc.getViewRoot().setViewId(extViewId);
action = action.substring(0, atPosition);
}
_base.handleNavigation(fc, actionMethod, action);
}
}
Bookmarks