0
我有我的複合材料部件<my:panel/>
:內部內容的複合成分
<composite:interface>
<composite:attribute name="header" />
<composite:attribute name="content" />
</composite:interface>
<composite:implementation>
<div class="panel panel-default">
<div class="panel-heading">#{cc.attrs.header}</div>
<div class="panel-body">
#{cc.attrs.content}
</div>
</div>
</composite:implementation>
,我用:
<my:panel header="My header" content="My content" />
好了,現在我想在內容屬性添加HTML(HTML表格如)代碼。 我該怎麼辦<my:tag/>
這樣的作品?
<my:tag header="My header" >
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
</table>
</my:tag>
你可能想看看UI:裝飾和這些鏈接: http://stackoverflow.com/questions/10778068/what-is-the-real-conceptual-difference-between-uidecorate-and- uiinclude http://stackoverflow.com/questions/9817851/is-it-possible-to-use-template-with-composite-component-in-jsf-2 –