2011-09-21 59 views

回答

0

可以創建一個複合組件作爲包裝和使用的背襯類:

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

<composite:implementation> 

    // place your wrapped component here 

</composite:implementation> 

覆蓋在背襯的類方法encodeChildren。

請注意:這是一個比干淨的解決方案,而不是一個黑客。取決於你想要做什麼,自定義渲染器將是適當的。