在索引中包含树页面(列表、视图、编辑)并使用相同的命令拖曳页面(列表和视图)。当我 List.xhtml 页面的查看或编辑按钮单击并打开它时;但是 View.xhtml 页面的编辑按钮单击然后显示在流动的按摩中:
Unable to find matching navigation case with from-view-id '/index.xhtml' for action '#{instituteController.viewEdit}' with outcome 'null'
.
我想要查看页面的编辑按钮单击以编辑页面打开到索引页面。List.xhtml 代码:
<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>
查看.xhtml代码
<h:commandButton action="#{instituteController.viewEdit}" value="#{bundle.ListInstituteEditLink}">
<f:ajax execute="@form" render="@form"/>
</h:commandButton>
InstituteController.java 代码:
public String prepareEdit() {
current = (Institute) getItems().getRowData();
selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex();
return "index";
}
public String viewEdit() {
return "null";
}
如果我返回 "index" ;这个命令不起作用。再次显示此代码:
public String viewEdit() {
return "index";
}