【发布时间】:2011-09-15 16:17:45
【问题描述】:
我想知道是否有一种用复合组件装饰组件的好方法?
例子:
<composite:implementation>
<div style="someFancyClass">
<h:inputText value="#{cc.attrs.value}" />
</div>
</composite:implementation>
在这种情况下,值属性被传递给包含的<h:inputText>。但是所有其他属性呢?我必须在<composite:interface> 部分中声明所有这些吗?
从标准组件中继承某种继承会很好,例如<h:inputText> 的 maxlength 属性在复合组件中自动可用。
【问题讨论】:
标签: jsf jsf-2 facelets composite-component