Jsf 内装复合材料组件
我有我的复合组件Jsf 内装复合材料组件,jsf,composite-component,Jsf,Composite Component,我有我的复合组件: <composite:interface> <composite:attribute name="header" /> <composite:attribute name="content" /> </composite:interface> <composite:implementation> <div class="panel panel-default"> <div cl
:
<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>
#{cc.attrs.header}
#{cc.attrs.content}
我用了:
<my:panel header="My header" content="My content" />
现在,我想在content属性中添加html(例如一个html表)代码。
我该如何处理
这样的工作
<my:tag header="My header" >
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
</table>
</my:tag>
名字
姓氏
年龄
试试
#{cc.attrs.header}
#{cc.attrs.content}
试试
#{cc.attrs.header}
#{cc.attrs.content}
您可能需要查看ui:decoration和这些链接:您可能需要查看ui:decoration和这些链接:
<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:insertChildren/>
</composite:implementation>