Mike,
In my case, I would like to bind the tabbedPanel and 'unrender' certain
child tab panes. When setComponent() is initially called, children do not
exist (NullPointerException). So, I'd have to bind each child tab using this
method, which brings us full circle back to the beginning of the discussion.


Again, I have to find fault with the spec concerning the component lifecycle
on initial request.

-----Original Message-----
From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 27, 2006 2:57 PM
To: MyFaces Discussion
Subject: Re: Help me understand component lifecycle please.


On 4/27/06, Neuman, Ben J., A&M IRM <[EMAIL PROTECTED]> wrote:
> Rhys, I think you hit the nail on the head. You can't get the component
> during the initial render response phase. The workarounds seem like an
awful
> lot of work for my needs.

Maybe I'm being naive, but I don't see the problem.

<component binding="#{initManagerBean.myComponent}" />

public class InitManagerBean {
    private UIComponent myComponent;
    public UIComponent getMyComponent { return this.myComponent; }
    public void setMyComponent(UIComponent myComponent) {
        this.myComponent = myComponent;
        if (reason)  myComponent.setRendered(false);
    }
}

This seems a lot easier than dealing with phase listeners.

Reply via email to