You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martijn Dashorst <ma...@gmail.com> on 2008/04/09 08:49:15 UTC
[announce] Wicket 1.3 has been branched, trunk is now 1.4
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.
If you wish to continue building 1.3 jars then switch your local checkout to:
svn switch https://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x
Martijn
Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4
Posted by Igor Vaynberg <ig...@gmail.com>.
also things like validator can key off component type
-igor
On Wed, Apr 9, 2008 at 3:59 AM, Johan Compagner <jc...@gmail.com> 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 <Ti...@ri.fi>
> 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/ >
> >
>
Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4
Posted by Johan Compagner <jc...@gmail.com>.
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 <Ti...@ri.fi>
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/ >
>
Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4
Posted by Maurice Marrink <ma...@gmail.com>.
There has been a discussion about whether or not to generify
component. currently component is generified.
Maurice
On Wed, Apr 9, 2008 at 9:25 AM, John Patterson <jd...@gmail.com> wrote:
> I like the type-safe getModelObject() and of course it is optional to
> specify a type.
>
>
>
> On 9 Apr 2008, at 14:18, Timo Rantalaiho 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/ >
> >
>
>
Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4
Posted by John Patterson <jd...@gmail.com>.
On 9 Apr 2008, at 14:32, Timo Rantalaiho wrote:
>
> "It is possible that future versions of the Java
> programming language will disallow the use of raw types."
>
> http://java.sun.com/docs/books/jls/third_edition/html/
> typesValues.html#110257
Wow very interesting. Thanks, didn't know that.
> Furthermore, if you have
>
> public class DropDownChoice<T> ... {
> ...
> public DropDownChoice(String id, IModel<T> default, List<T>
> choices)
>
> you cannot just use the type for the model and skip it for
> the Component; AFAIK this does not work:
>
> DropDownChoice<?> fooSelection = new DropDownChoice<?>
> ("fooSelection",
> new Model<Foo>(foo), fooList);
AFAIK you can do this:
DropDownChoice fooSelection = new DropDownChoice("fooSelection",
new Model<Foo>(foo), fooList);
But with a warning in Eclipse. But considering that "use of raw
types in code written after the introduction of genericity into the
Java programming language is strongly discouraged" I guess its best
not to do that!
John
Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4
Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Wed, 09 Apr 2008, John Patterson wrote:
> I like the type-safe getModelObject() and of course it is optional to
> specify a type.
Not entirely
"It is possible that future versions of the Java
programming language will disallow the use of raw types."
http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#110257
Furthermore, if you have
public class DropDownChoice<T> ... {
...
public DropDownChoice(String id, IModel<T> default, List<T> choices)
you cannot just use the type for the model and skip it for
the Component; AFAIK this does not work:
DropDownChoice<?> fooSelection = new DropDownChoice<?>("fooSelection",
new Model<Foo>(foo), fooList);
Best wishes,
Timo
--
Timo Rantalaiho
Reaktor Innovations Oy <URL: http://www.ri.fi/ >
Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4
Posted by John Patterson <jd...@gmail.com>.
I like the type-safe getModelObject() and of course it is optional to
specify a type.
On 9 Apr 2008, at 14:18, Timo Rantalaiho 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/ >
Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4
Posted by Timo Rantalaiho <Ti...@ri.fi>.
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/ >