onInitialize is only there to provide an place on the component code where you can rely on a path to the page from the component. It is useless inside an page.
On Tue, Feb 1, 2011 at 9:25 AM, tetsuo <ronald.tet...@gmail.com> wrote: > Overriding onInitialize() on Pages certainly may cause some problems, > if you mix adding components there and in constructors in the same > class hierarchy, but it will work with some care. I'm using > onInitialize() to build Pages, because, in the infrastructure already > built in a project I'm working on, I have to instantiate Pages to > determine if a link to it is enabled or not. I don't use its > 'construction', I don't need components. I just instantiate it to call > a method 'hasPermission()' on it. > > Well, please don't tell me I shouldn't do it, it works and works well. > The only problem is that in 1.5 the method is final on Pages. Is there > any workaround? Would you consider reverting this change? Or will I > have to stay with 1.4 forever? > > Tetsuo > -- Pedro Henrique Oliveira dos Santos