【发布时间】:2011-06-30 22:46:24
【问题描述】:
我有一个简单的 JSF 应用程序。一切正常,但不是导航。它的行为就像<navigation-rule>s 不存在。在我的 faces-config.xml 中,我有一些导航规则,例如:
<navigation-rule>
<from-view-id>/view/party/create/create.xhtml</from-view-id>
<navigation-case>
<from-outcome>edit</from-outcome>
<if>#{partyCreate.partyTypeSearch.code == partyTypeDao.organisation.code}</if>
<to-view-id>/view/party/create/edit-organisation.xhtml</to-view-id>
<redirect />
</navigation-case>
</navigation-rule>
但是当我点击 create.xhtml 页面上的按钮时,我收到消息:
Unable to find matching navigation case with from-view-id '/view/party/create/create.xhtml' for action '#{partyCreate.displayParty}' with outcome 'edit'
是什么原因造成的?我有第二个应用程序,其设置几乎相同,并且导航工作正常。如何调试以检查问题所在?初始化等时没有错误消息。
【问题讨论】:
-
如果您删除
<if>(仅用于测试)怎么办?如果无效,如果您也删除<from-view-id>怎么办? -
好的,它有效。
表达式有错误。可惜没有在任何地方报道。还是谢谢! -
好的,我把它作为答案转发了。
标签: jsf navigation