views:

326

answers:

2

Hi all,

I'm having an issue.

I've implemented a PhaseListener, which is meant to add a style class to any UIInput components in the tree that have messages attached to them, and removes the style class if it doesn't have any messages attached to them.

The PhaseListener runs in the RENDER_RESPONSE phase, and does it's work in both the beforePhase and afterPhase methods while debugging. While debugging, I found that beforePhase doesn't have access to the full component tree, but afterPhase does. Any changes done in afterPhase aren't rendered though.

How do I go about this? I want this to be completely server side.

Thanks,

James

A: 

Implemented using a ViewHandler, however it's not efficient. PhaseListener in Render Response phase doesn't have access to the component tree.

jamiebarrow
A: 

Could you explain more your solution.

I think I am facing the same issue. I have to modify the component tree during an ajax request. And if I add or delete a component in the tree, it does not take into account during the render response phase.

Thanks,

Guillaume

Guillaume