I see. Let me give something like this a try. But first, one question: when
in the lifecycle would setMyComponent() get called?


-----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