On 11/3/07, Dmitry Kandalov <[EMAIL PROTECTED]> wrote:

> On Sunday 04 November 2007 01:23:39 Eelco Hillenius wrote:
> > > IMHO it does make sense. When I see several different super(...) calls
> in
> > > constructors the first thing that crosses my mind is that these
> > > superclass constructors have different logic. But it's not true for
> > > wicket and in most Component subclasses I can call super(id,
> > > (IModel)null). Can I?
>
> Sorry for commenting myself. The point was that using only one call to
> super(...) can make code more explicit. For instance to make sure that all
> WebPage constructors do afterall "the same" thing you have to go through
> hierarchy to Component. I guess that's what the original post was about.


You just should call super of the same constructor you are in.
just give the super call everything you got. If you got a model, give it
but you don;t have to you can set it in the constructor with setModel
afterwards.


I still don't get what this discussion is more about

Things like this

public Constructor()
{
  init()
}

private void init()
{
}

is still constructing in the constructor. Only handy if you have more then 1
constructor.

If you really want to have an init phase thats called after the constructor
is called (and finished)
then i think you should choose a different web framework, That uses managed
components/pages

johan

Reply via email to