This won't affect abstractree at all, as it does the initialization in
onBeforeRender. Also onAttach/onBeforeRender does not do _lazy_
initialization. Lazy initialization means that something is
initialized on first usage, which doesn't hold true with these method,
as they are called whether you need the initialized thing or not.

If you are using onAttach to do the initialization now, your best bet
is to just use onBeforeRender.

-Matej

On 10/8/07, cwilkes <[EMAIL PROTECTED]> wrote:
>
> Is the preferred way of lazily initializing this:
>
>   @Override
>   public void onBeforeRender() {
>      // initialize your own stuff
>      super.onBeforeRender();
>   }
>
> Looking at the code for ListView it looks like you have to do your own
> initialization before ListView does its in the onBeforeRender method.
>
> And I'm not sure how removing onAttach will affect things like AbstractTree
> which look at the attached state before doing anything in onBeforeRender.
>
> Can there be a guideline posted to the wiki on what to do if you're
> currently using onAttach?
>
>
> Matej Knopp-2 wrote:
> >
> > I think you can just put the code to onBeforeRender().
> >
> > -Matej
> >
> > On 10/8/07, Sam Hough <[EMAIL PROTECTED]> wrote:
> >>
> >> What would the nice replacement for:
> >>             @Override
> >>             public void onAttach() {
> >>                 super.onAttach();
> >>                 getForm().setDefaultButton(this);
> >>             }
> >> be?
> >>
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Remove-%28on%29attach--tf4583596.html#a13100057
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>

Reply via email to