首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在faces-config中获取路径

在faces-config中获取路径
EN

Stack Overflow用户
提问于 2012-08-03 10:52:10
回答 1查看 323关注 0票数 0

我想将JSF中faces-config文件中的路径嵌入到xhtml页面中。在faces-config中:

代码语言:javascript
复制
<navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
        <from-outcome>left</from-outcome>
        <to-view-id>/Template/LeftPage.xhtml</to-view-id>
    </navigation-case>
</navigation-rule>

在xhtml中,我想在ui标签<ui:include src="??????" />中获得它,请帮助我做到这一点。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-08-03 11:36:02

我认为faces-config用于声明托管bean和导航页面。像这样使用,

代码语言:javascript
复制
 <f:view xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:rich="http://richfaces.org/rich">
 <meta http-equiv="Content-Type" content="text/html"/>
 <head>
 </head>
    <body  >
    <h:form >
    <div id="messagediv">
        <rich:messages globalOnly="true" style="color:red;font-size:12px;weight:bold;"/>
    </div>
        <div align="center">
            <table cellpadding="0" cellspacing="0" border="0" width="1160">
                <tbody>
                    <tr>
                        <td>
                            ***<ui:include src="/include/header1.xhtml" />***
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div style="background:white;padding: 20px 20px 20px 30px;height:#{contentHeight}px;">
                                <ui:insert name="content"/>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </h:form>
</body>

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11788586

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档