我有一个我打算用作输入模板的标记文件:
<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>
在标记文件中包含正文?