Include tree page (List, View, Edit) in index and used same command tow page (List and View) .When I List.xhtml page ‘s View or Edit button click and open it; but View.xhtml page’s Edit button click then show in flowing massage:
Unable to find matching navigation case with from-view-id '/index.xhtml' for action '#{instituteController.viewEdit}' with outcome 'null'
.
I want View page’s Edit button click to edit page open into index page. List.xhtml code:
<h:commandButton action="#{instituteController.prepareView}" value="#{bundle.ListInstituteViewLink}">
<f:ajax execute="@form" render="@form"/>
</h:commandButton>
<h:commandButton action="#{instituteController.prepareEdit}" value="#{bundle.ListInstituteEditLink}">
<f:ajax execute="@form" render="@form"/>
</h:commandButton>
View.xhtml code
<h:commandButton action="#{instituteController.viewEdit}" value="#{bundle.ListInstituteEditLink}">
<f:ajax execute="@form" render="@form"/>
</h:commandButton>
instituteController.java code:
public String prepareEdit() {
current = (Institute) getItems().getRowData();
selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex();
return "index";
}
public String viewEdit() {
return "null";
}
If I return "index" ; this command don't work. Again show this code:
public String viewEdit() {
return "index";
}