Hi,
That's exactly how I am using onInitialize on Pages / Components - to
call overridable factory methods outside of the constructor.
So for me:
+1 (re-)make onInitialize non final
Regards,
Daniel
On 02.02.2011 11:11, Hans Lesmeister 2 wrote:
Hi,
After onInitialize was introduced in 1.4.12 we have done a lot of
refactoring in a lot of pages to get component-creation out of the
constructors and into onInitialize. Especially calling overridable factory
methods from a constructor is gone now which we and PMD really appreciate.
Carl-Eric Menzel-7 wrote:
I think this could be sufficiently
guarded by putting a good explanation on onInitialize's javadoc.
Besides, by this logic, Component is also incompletely initialized
until the moment it gets added to the page.
Ack
+1 for Carl-Eric's patch
Cheers
Hans