Okay, I decided should just go ahead and put my money where my mouth
is :)

Delaying onInitialize for pages isn't really feasible, I think. So I
created a patch that would make onInitialize final in Page (as Pedro
said) and introduces a new event onPageInitialize that is only called
on pages. It honors the same contract as onInitialize, i.e. it is
called only once per page object, at some point before onBeforeRender.

See https://issues.apache.org/jira/browse/WICKET-3218 for details.

Carl-Eric
www.wicketbuch.de

On Thu, 2 Dec 2010 13:50:30 +0100
Carl-Eric Menzel <cmen...@wicketbuch.de> wrote:

> 
> > Make onInitialize final on pages is an good idea. It is designed to
> > children have a guaranty that the path to page exists, not to
> > guaranty that an parent has all its children on the hierarchy
> > already. So it is fairly more useful to children than for parent
> > components. I just don't know if that change implies in rename the
> > onInitialize to notifyHierarchy or similar.
> 
> While I think making onInitialize final for Pages is a *valid*
> solution, I think it is not really useful. I still can have the same
> problem in Pages that onInitialize is trying to solve for Components:
> That some things can only be done once *all* constructors have run.
> With Components, I can use onInitialize. I would really like to be
> able to do the same for Pages.
> 
> Carl-Eric
> www.wicketbuch.de

Reply via email to