JSF フローを作成しました。私の定義は次のとおりです。
<flow-definition id="registration">
<initializer>#{registrationBean.initializeFlow}</initializer>
<start-node>personalDetails</start-node>
<view id="personalDetails">
<vdl-document>/registration/personal-details.xhtml</vdl-document>
</view>
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>registration</from-outcome>
<to-view-id>/registration/personal-details.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/registration/personal-details.xhtml</from-view-id>
<navigation-case>
<from-outcome>next</from-outcome>
<to-view-id>/registration/cultural-details.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/registration/cultural-details.xhtml</from-view-id>
<navigation-case>
<from-outcome>previous</from-outcome>
<to-view-id>/registration/personal-details.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>next</from-outcome>
<to-view-id>/registration/profile-details.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/registration/profile-details.xhtml</from-view-id>
<navigation-case>
<from-outcome>previous</from-outcome>
<to-view-id>/registration/cultural-details.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>next</from-outcome>
<to-view-id>/registration/preview.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/registration/preview.xhtml</from-view-id>
<navigation-case>
<from-outcome>previous</from-outcome>
<to-view-id>/registration/profile-details.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/registration-complete.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<flow-return id="cancel">
<from-outcome>cancel</from-outcome>
</flow-return>
<finalizer>#{registrationBean.finalizeFlow}</finalizer>
</flow-definition>
Faces フローを移動すると、実際のフロー ページには問題はありませんが、テンプレートは奇妙なエラーを出力しています。
Unable to find matching navigation case from view ID '/registration/personal-details.xhtml' for outcome 'registration'
/registration/personal-details.xhtml
は現在のファイル名registration
で、 は現在のフロー スコープの名前です。
メニューにあるレンダリングされたリンクも次のようにレンダリングされます。
Sign Up
フローの外側、または:
Sign Up: This link is disabled because a navigation case could not be matched.
流れの中。
同時に、Glassfish のログには次のように表示されます。
Warning: JSF1064: Unable to find or serve resource, /registration/registration.xhtml.
これregistration.xhtml
は存在しませんが、config.xml を変更することでデフォルトのファイル名を上書きできると思い<start-node>
ました。
ファイル構造をデフォルト以外の値のままにして、これを機能させる方法はありますか? 問題は正確には何ですか?