Jsf h:commandButton';未调用的操作
我使用的是JSF2.0,在home.xHTML的div部分中有一个commandButton。它不起作用了。我没有看到destinationPage,只保留在home.xhtml中 home.xhtml:Jsf h:commandButton';未调用的操作,jsf,richfaces,Jsf,Richfaces,我使用的是JSF2.0,在home.xHTML的div部分中有一个commandButton。它不起作用了。我没有看到destinationPage,只保留在home.xhtml中 home.xhtml: <div id="left_side"> <ui:include src="login.xhtml" /> <h:form> <h:commandButton value="register" action
<div id="left_side">
<ui:include src="login.xhtml" />
<h:form>
<h:commandButton value="register" action="register"/>
</h:form>
</div>
register.xhtml位于h:body和h:form内部
以及faces-config.xml配置:
<navigation-rule>
<from-view-id>home.xhtml</from-view-id>
<navigation-case>
<from-outcome>register</from-outcome>
<to-view-id>register.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
home.xhtml
登记
register.xhtml
如果home.xhtml
和register.xhtml
位于应用程序的根目录,则需要按如下方式定义导航规则:
<navigation-rule>
<from-view-id>/home.xhtml</from-view-id>
<navigation-case>
<from-outcome>register</from-outcome>
<to-view-id>/register.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
乳清在webapp(根)/模板中。。因此,我添加了:/templates/home.xhtml和/templates/register.xhtml。。事情并没有好转。试试我的最新答案。完成。。现在它写在注册按钮上:禁用,因为导航案例无法匹配…faces配置有问题吗?为什么?你把它放在哪里了?另外,请在web-INF(faces配置文件)中添加web.xml的同时添加内容。。还有web.xml(who内容:Faces Servlet/Faces/*Faces Servlet..Faces Servlet*.Faces..*.xhtml javax.Faces.PROJECT_STAGE Development)
<h:button outcome="register" value="register" />