also things like validator can key off component type
-igor
On Wed, Apr 9, 2008 at 3:59 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:
> Yes i know it is more clutter, i hope sun will solve this somehow so that
> you dont have to type it that much
> for example
>
> HashMap<String,Person> map = new HashMap(); // why do it twice after the
> new.. it should just be allowed without warning.
>
> But if we dont do component then yes getModelObject doesn't work
> But also getModel doesn't work.. So when you give your model to a component
> it looses the generics...
>
> one big plus is that some components like ListView or DropDownChoice now
> tell you how to use it
> ListView is hard coded now als <List<T>> and DropDownChoice is suddenly made
> clear to everybody
> I now dont have to copy paste this line in many many many user list emails
> to explain how DDC works:
>
> public DropDownChoice(String id, IModel<T> model, IModel<List<T>>
> choices,
> IChoiceRenderer<T> renderer)
>
> johan
>
> On Wed, Apr 9, 2008 at 9:18 AM, Timo Rantalaiho <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On Wed, 09 Apr 2008, Martijn Dashorst wrote:
> > > If you are depending on trunk and build your own Wicket versions,
> > > please note that trunk is now Wicket 1.4 and will be used for the next
> > > Wicket version.
> >
> > Is there already a specific plan (or even local changes on
> > Johan's machine :)) on what exactly will be generified?
> >
> > DropDownChoice fooSelection = new DropDownChoice("fooSelection",
> > new Model<Foo>(foo), fooList);
> >
> > or
> >
> > DropDownChoice<Foo> fooSelection = new DropDownChoice<Foo>("fooSelection",
> > new Model<Foo>(foo), fooList);
> >
> > ? Old 2.0 had the latter way of generifying also Component,
> > which removes the need to cast when doing getModelObject(),
> > but adds a lot of clutter in all Component declarations.
> >
> > Have you thought of whether it would make sense to only
> > generify IModel and retain Object in get/setModelObject? Or
> > was this already tried with 2.0?
> >
> > Best wishes,
> > Timo
> >
> > --
> > Timo Rantalaiho
> > Reaktor Innovations Oy <URL: http://www.ri.fi/ >
> >
>