How to identify if <some:element> is a tag handler or a component handler?

67 Views Asked by At

How to identify if <some:element> is a tag handler or a component handler during the development process (e.g. in Eclipse)? As of "Mastering JavaServer Faces 2.2" (Anghel Leonard) p. 538, <ui:repeat> is a component handler whereas <ui:include> is a tag handler. But during development I don't see any difference but the ignorance of that existing difference may lead to serious application errors.

1

There are 1 best solutions below

0
On BEST ANSWER

during the development process

The quickest way is to try setting the rendered attribute to false.

<ui:repeat ... rendered="false">
    ...
</ui:repeat>
<ui:include ... rendered="false">
    ...
</ui:include>

If that works, i.e. the output suddenly disappears when refreshing the page in your favorite web browser, then it's an UIComponent. If that doesn't work, then it's a TagHandler.

This is because the rendered (and binding and id) attributes are only defined in the UIComponent superclass.