Mr Mean wrote:
>
> Such an initialize method can easily be done by users them self with a
> simple factory pattern.
>
Can you give an example of this?
Mr Mean wrote:
>
> So why bloat our api with it?
>
Building such extendable components seems to be a core feature of wicket and
one of its major selling points. I have unwittingly built many components
that suffer from this problem already and I imagine it is a fairly common
situation. It only becomes obvious when your subclass needs to access
constructor parameters that your component acts in bizarre ways when
extended. Now that is confusing.
Would others agree that it is fairly common to allow subclasses to override
some components? Or is this a corner case in wicket development?
Mr Mean wrote:
>
> Not more confusing, just confusing. i can already see the mails
> arriving on the mailing list. Documenting a behavior will only go so
> far, as the current problem so elegantly shows ;)
>
Is this issue even documented yet? I will create a page for it but waiting
until this discussion closes
Mr Mean wrote:
>
> Don't get me wrong i am all in favor of finding a good solution for
> this, but imho so far i have not yet heard a solution that provides a
> significantly better approach.
>
Both your suggested factory method and the proposed onXXXXXX() method would
need to solve the problems of
1 - Checking against adding components more than once
2 - requirement to call super.onBeforeRender()
and so would be significantly better - especially if this is a common
pattern.
John
--
View this message in context:
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16918361.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]