I want to navigate from a webpage to another with a Navigation Rule and get the facesmessage :
No navigation case match for viewId /content/diagram.xhtml, action null and outcome edit_weekedit
My Faces Config looks like:
<navigation-rule>
<from-view-id>/content/diagram.xhtml</from-view-id>
<navigation-case>
<from-outcome>edit-weekedit</from-outcome>
<to-view-id>/edit/editnotice.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
My method that navigates is:
public void changeListener(AjaxBehaviorEvent event) {
SelectOneMenu source = (SelectOneMenu) event.getSource();
if (source.getValue().equals("number_of_node")) {
FacesContext facesContext = FacesContext.getCurrentInstance();
String outcome = "edit_weekedit"; // Do your thing?
facesContext.getApplication().getNavigationHandler().handleNavigation(facesContext,null, outcome);
}
}
I use apache myfaces 2.0.
Whats wrong here?
Best Regards Veote
In your
changeListeneryour outcome isedit_weekeditwith underscore but in your config you haveedit-weekeditwith hyphen. Hence the error, please make both of them same and rerun.