【发布时间】:2014-07-31 09:10:00
【问题描述】:
我的自定义组件目前是在自定义taglib.xml文件中声明的,其中一些需要处理程序,例如:
<tag>
<tag-name>mycomponent</tag-name>
<component>
<component-type>com.so.MyComponent</component-type>
<renderer-type>com.so.MyComponentRenderer</renderer-type>
<handler-class>com.so.MyComponentHandler</handler-class>
</component>
</tag>
现在我想从新的基于注释的 JSF 2.2 声明中受益,写作:
@FacesComponent(value = MyComponent.COMPONENT_TYPE, tagName = "mycomponent", createTag = true)
public class MyComponent {
...但我不知道如何将组件处理程序附加到此类。处理程序类是否有任何注释?
提前非常感谢!
【问题讨论】:
标签: jsf custom-component jsf-2.2 taglib