First i dont want a boolen in the components that onFirstRender() is called.
I want a boolean that it is not called. So in the constructor of
component we set the flag and clear it when first rendered.

Do remember that in onBeforeRende components/panels and all can be
created again but i think this will go ok.

Johan

On 4/29/08, James Carman <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 29, 2008 at 10:24 AM, John Patterson <[EMAIL PROTECTED]> wrote:
> >
> >  This approach breaks a components encapsulation because the listener must
> be
> >  installed in the application.  Even if IInitializers can be used to do
> this
> >  once it ads an extra complication to creating reusable components.
> >
>
> Perhaps this could be added to "core" since it's a common enough
> pattern?  That way, you wouldn't have to worry about the requirement
> of making sure that you add the listener in.  It would be there
> automatically.
>
> Or, you can do this manually in your own Component class and not rely
> upon the listener to call it.  You just do it in onBeforeRender() and
> slap that meta tag on the component after you perform the
> initialization.  Or, we make a new callback method on Component called
> onBeforeFirstRender() or something.  I don't know.  I'm just trying to
> help come up with ideas here.  In our application, the
> IBeforeFirstRenderListener approach is working because I'm not
> creating re-usable components to be consumed outside my application.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to