【问题标题】:Extend JSF component CommandLink扩展 JSF 组件 CommandLink
【发布时间】:2011-11-22 00:20:06
【问题描述】:

如何扩展 jsf primeface 链接?我想在链接中使用actionListener 属性并覆盖encodeAll 方法。

【问题讨论】:

    标签: jsf


    【解决方案1】:

    您可以创建一个复合组件作为包装器并使用支持类:

    <composite:interface componentType="my.special.Class">
    ...
    </composite:interface>
    
    <composite:implementation>
    
      // place your wrapped component here
    
    </composite:implementation>
    

    覆盖支持类中的 encodeChildren 方法。

    请注意:这与其说是一个干净的解决方案,不如说是一个 hack。根据您要执行的操作,自定义渲染器将是合适的。

    【讨论】:

      猜你喜欢
      • 2011-06-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-25
      • 2023-03-28
      • 2023-03-27
      • 2012-08-04
      相关资源
      最近更新 更多