On 8/3/06, Venkat Rao <[EMAIL PROTECTED]> wrote:
I have registered a Phase Listener by declaring it in faces-config.xml. In
my PhaseListener, I am interested only in the RENDER_RESPONSE phase.

The very first time my application is invoked, the beforePhase() method is
called even before the component binding methods are called. I would have
expected that all the components would be created, their binding methods
would be invoked and *then* would the beforePhase() method for
RENDER_RESPONSE be invoked.

On subsequent postbacks, invocations of beforePhase() are as expected (that
is, component binding is done first, before the beforePhase() is invoked)

The component tree is built during the renderResponse phase, so it
won't be available before that on the first request to a page.

It could be worse.  Without facelets, the tree is built "as you go
along."   With Facelets or JSF 1.2, I'm pretty sure that the component
tree is built and then rendered during the renderResponse phase.   So
you might be able to create a custom interceptor component as the
first component on your page, and then run your code during that
component's rendering method, and the tree should exist at this point.
  But there's a bit of speculation here so I can't guarantee it.

Reply via email to