Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.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
Templates <;af:pageTemplate>;jsf模板未在我的页面中拉伸_Templates_Jsf_Oracle Adf - Fatal编程技术网

Templates <;af:pageTemplate>;jsf模板未在我的页面中拉伸

Templates <;af:pageTemplate>;jsf模板未在我的页面中拉伸,templates,jsf,oracle-adf,Templates,Jsf,Oracle Adf,我有一个非常简单的页面模板定义“af:pageTemplateDef”(TemplateAdmin4.jsf)。正如您所看到的,模板根包含一个面板拉伸布局,它应该使模板拉伸到其父级(垂直和水平) 模板管理员4 我有.jsf页面(ErrorPage.jsf)我把模板放在上面的地方,你可以看到行 <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transiti

我有一个非常简单的页面模板定义“af:pageTemplateDef”(TemplateAdmin4.jsf)。正如您所看到的,模板根包含一个面板拉伸布局,它应该使模板拉伸到其父级(垂直和水平)


模板管理员4
我有.jsf页面(ErrorPage.jsf)我把模板放在上面的地方,你可以看到行

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:document title="ErrorPage.jsf" id="d1">
    <af:form id="f1">
        <af:panelStretchLayout id="psl1">
            <f:facet name="center">
                <af:panelSplitter id="ps1">
                    <f:facet name="first">
                        <af:navigationPane id="np1">
                            <af:commandNavigationItem text="commandNavigationItem 1" id="cni1"/>
                        </af:navigationPane>
                    </f:facet>
                    <f:facet name="second">
                        <af:pageTemplate viewId="/TemplateAdmin4.jsf" id="pt2"/>
                    </f:facet>
                </af:panelSplitter>
            </f:facet>
        </af:panelStretchLayout>
    </af:form>
</af:document>
</f:view>

最后,我放置的模板没有延伸到页面中。为什么会发生这种情况?
如您所见,我也在ErrorPage.jsf页面中放置了一个面板strechlayout。并且在其内部有一个pannelSplitter(其维度窗体也设置为父级

在af:panelStretchLayout的样式类中使用AFStretchWidth

我注意到,如果使用嵌套模板,我就不会有这个问题。我的意思是如果在其他模板定义(pageTemplateDef)中使用模板。这就是我解决问题所做的

我遇到了同样的问题,并通过将styleClass=“AFVisualRoot”添加到模板中的根af:panelStretchLayout组件来修复它

谢谢大家!!但是它只是水平地(而不是垂直地)拉伸页面。很抱歉误解了,我以为你关心的是水平拉伸!
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:document title="ErrorPage.jsf" id="d1">
    <af:form id="f1">
        <af:panelStretchLayout id="psl1">
            <f:facet name="center">
                <af:panelSplitter id="ps1">
                    <f:facet name="first">
                        <af:navigationPane id="np1">
                            <af:commandNavigationItem text="commandNavigationItem 1" id="cni1"/>
                        </af:navigationPane>
                    </f:facet>
                    <f:facet name="second">
                        <af:pageTemplate viewId="/TemplateAdmin4.jsf" id="pt2"/>
                    </f:facet>
                </af:panelSplitter>
            </f:facet>
        </af:panelStretchLayout>
    </af:form>
</af:document>
</f:view>