Does JSF have a way to get the tag handlers in the current view?

33 Views Asked by At

We have a JSF taglib we're using that dynamically adds components to a view. One of these components is an alternative button... the command button dynamically adds a an actual command button as a subcomponent of itself (in addition to some other useful stuff).

We want to use <o:validateBean />. Normally we'd implement a PostAddToViewEevnt listener and just move the components from the parent to the child. HOWEVER, Omnifaces' <o:validateBean /> is implemented as a TagHandler, not a UIComponent.

Since the apply() method of the ValidateBean TagHandler is called in the RESTORE_VIEW phase, one idea would be to implement a PhaseListener that gets ahold of the view and moves the <o:validateBean /> to the correct component.

I can't seem to find a JSF API to peruse the view declaration and grab any TagHandlers and modify the layout however.

Even if you don't have an exact answer, if anyone could comment on modifying layouts with a TagHandler it made lead us to the right answer. Thank you!

0

There are 0 best solutions below