Facelet客户端不使用已分配的facelet客户端

时间:2014-10-31 11:59:44

标签: jsf

希望你能帮我解决这个琐碎的问题。我创建了一个这样的facelet模板:

<?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">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet name="./css/default.css"/>
        <h:outputStylesheet name="./css/cssLayout.css"/>
        <title>Facelets Template</title>
        </h:head>

        <h:body>

            <div id="top">
                <ui:insert name="top"><h1>Super Cool App</h1></ui:insert>
            </div>

            <div id="content" class="center_content">
                <ui:insert name="content">Content</ui:insert>
            </div>

            <div id="bottom">
                <ui:insert name="bottom"><br/><br/>Powered by GlassFish & NetBeans</ui:insert>
            </div>

        </h:body>

    </html>

现在我有一个facelet客户端,它被分配给模板,如下所示。但是,当我删除客户端facelet的顶部和底部时,它应该从模板中固定顶部和底部的东西,对吧?但事实并非如此。你能告诉我,我做错了吗?

<?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">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

    <body>

        <ui:composition template="./WEB-INF/templates/template.xhtml">

            <ui:define name="content">
                content
            </ui:define>

        </ui:composition>

    </body>
</html>

提前致谢。见到你。

0 个答案:

没有答案