2011-09-21 54 views

回答

0

可以创建一个复合组件作为包装和使用的背衬类:

<composite:interface componentType="my.special.Class"> 
... 
</composite:interface> 

<composite:implementation> 

    // place your wrapped component here 

</composite:implementation> 

覆盖在背衬的类方法encodeChildren。

请注意:这是一个比干净的解决方案,而不是一个黑客。取决于你想要做什么,自定义渲染器将是适当的。