Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JSF FlowFaces无法从视图ID';当前页面';对于结果'&书信电报;流量名称>';_Jsf_Jakarta Ee_Jsf 2_Glassfish_Faces Flow - Fatal编程技术网

JSF FlowFaces无法从视图ID';当前页面';对于结果'&书信电报;流量名称>';

JSF FlowFaces无法从视图ID';当前页面';对于结果'&书信电报;流量名称>';,jsf,jakarta-ee,jsf-2,glassfish,faces-flow,Jsf,Jakarta Ee,Jsf 2,Glassfish,Faces Flow,我已经创建了一个JSF流。我的定义如下: <flow-definition id="registration"> <initializer>#{registrationBean.initializeFlow}</initializer> <start-node>personalDetails</start-node> <view id="personalDetails"> <

我已经创建了一个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>
其中,
/registration/personal details.xhtml
是当前文件名,
registration
是当前流范围的名称

菜单中的渲染链接也渲染为:

Sign Up
在流程之外,或:

Sign Up: This link is disabled because a navigation case could not be matched.
在流程内部

同时,玻璃鱼日志给了我以下信息:

Warning:   JSF1064: Unable to find or serve resource, /registration/registration.xhtml.
这个
registration.xhtml
不存在,但我认为可以通过更改配置中的
来覆盖默认文件名


有什么方法可以使我的文件结构保持非默认值并使其正常工作?问题到底出在哪里?

第一个视图似乎必须是
注册.xhtml
(或者通常是
.xhtml
),这样我就可以消除错误消息,从技术上来说,这个“回答”了我的问题,但我更希望能够按照我认为合适的方式命名我的视图,如果可能的话,不必使用默认值,因此,如果有人对此问题有更好的意见,我会坚持选择答案。您可以在@Producer方法中使用FlowBuilder重命名起始页(或使用任何目录中的任意faces页),而不是使用XML配置

见:


这需要从face-config.xml切换到基于代码的配置。。。基于面/目录的配置不是很灵活,需要遵守标准约定

似乎我能找到的唯一方法就是使用默认的命名约定。有点难看,但除非有更好的报价,否则这就是答案。
Warning:   JSF1064: Unable to find or serve resource, /registration/registration.xhtml.