Eelco Hillenius schrieb:
We're hoping for you help, and of course we hope that you'll like Wicket 2.0

I wasn't convinced by the constructor change at first for two reasons:

- Requiring a constructor can be very limiting for clients of the API
- add() seems to be a very intuitive method for adding children to a component

After thinking about the impact that this change would have on the actual code I am writing, I changed my opinion. Quite often, I have code fragments that look similar to your example in the wiki article:

  MyLink link = new MyLink("link");
  add(link);
  link.add(new Label("myLabel", "myText"));

The Wicket 2.0 version is much more streamlined:

  MyLink link = new MyLink(this, "link");
  new Label(link, "myLabel", "myText");


One thing that came into my mind regards the use of repeaters. Instead of requiring this not very intuitive code:

  Repeater r = ...
  r.add(new Label(r, r.newChildId()));

It would be possible to let the child acquire it's ID from the parent:

  class Label {
    Label(Repeater parent) {
      super(parent, parent.newChildId());
    }
  }

Resulting in a nicer usage:

  Repeater r = ...
  r.add(new Label(r));

I am not sure about the impact, but it looks nice from my naive perspective.


Regarding the use of Generics for IModel and Components, I think that it's a perfect fit. So, yes, I think I'm going to like 2.0 :)


Where do you need help, and how should that work? I would imagine that it wouldn't help much if everyone bombards you with incompatible patches.


Timo


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to