【发布时间】:2015-03-28 15:35:35
【问题描述】:
我有一个我打算用作输入模板的标记文件:
<ui:composition
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<div class="qr">
<label>#{question}</label>
<div class="helpButton"></div>
<!-- body here -->
<!-- errors output eventually to go here -->
</div>
</ui:composition>
它存储在我的/WEB-INF/tags 文件夹中,带有.taglib.xml 和必要的web.xml 上下文参数。
我知道它可以如下使用:
<g:question question="What is your name?" id="firstname">
<h:inputText value="#{bean.firstname}" />
</g:question>
目前这是最基本的形式。我打算使用各种复杂的输入。但是标签等的布局总是需要保持不变。
如何在标签文件中包含<g:question> 的正文?
【问题讨论】:
标签: jsf facelets jsf-2.2 tagfile