yeah i know just wanted to give an example

But Label == String is not the really the same thing as ListView == List..

Because for a Label getModelObject() doesnt have to be a String (it can be
anything)
but for ListView.getModelObject() does have to be a List..

This is also because our converters sit between modelobject -> string
representation.
So for a Listview a converter is not really used, as for a label it is used
or called for pretty much everytime.

johan



On Tue, May 13, 2008 at 9:52 PM, Jonathan Locke <[EMAIL PROTECTED]>
wrote:

>
>
> have not thought it through.  i was just pointing out another option.
> in some sense a label shows a string like a listview shows a list.
> that's all.
>
>
> Johan Compagner wrote:
> >
> > cant i have a Label that has a Date as a object?
> > That is resolved by the converter for display?
> >
> > johan
> >
> >
> > On Tue, May 13, 2008 at 6:09 PM, Jonathan Locke <
> [EMAIL PROTECTED]>
> > wrote:
> >
> >>
> >>
> >> well, unless this:
> >>
> >>  public class Label<T> extends WebComponent<T>
> >>
> >> became:
> >>
> >>  public class Label extends WebComponent<String>
> >>
> >> not saying this is the right thing to do as it might break a lot of
> code,
> >> but it would be more precise.
> >>
> >>
> >> Johan Compagner wrote:
> >> >
> >> > the only thing i can quickly come up with is this
> >> >
> >> >         public ExtendLabel(String id, T string)
> >> >         {
> >> >             super(id, new Model<T>(string));
> >> >         }
> >> >
> >> >
> >> >
> >> >
> >> > On Tue, May 13, 2008 at 4:55 PM, Stefan Simik <[EMAIL PROTECTED]
> >
> >> > wrote:
> >> >
> >> >>
> >> >> Thx Maurice, your are right. I was using Wicket 1.4M1.
> >> >> I checked out latest from trunk, and it OK. ;)
> >> >>
> >> >> So another problematic compiler warning.
> >> >> For example  simple  - subtype of Label, which has model type of
> >> anything
> >> >> Serializable.
> >> >>
> >> >>
> >> >>
> >> >> public class ExtendedLabel&lt;T extends Serializable&gt; extends
> >> >> Label&lt;T&gt{
> >> >>
> >> >>   private IStringProvider stringProvider = null;
> >> >>
> >> >>
> >> >>   public ExtendedLabel(String id, IModel model, IStringProvider
> >> >> stringProvider) {
> >> >>        super(id, model);
> >> >>        this.stringProvider = stringProvider;
> >> >>   }
> >> >>
> >> >>   public ExtendedLabel(String id, String text) {
> >> >>        this(id, new Model(text), new BasicStringProvider());
> >> >>        //this(id, new Model&lt;T&gt;(text), new
> >> BasicStringProvider());
> >> >> //error
> >> >>   }
> >> >>
> >> >> }
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> The problematic part, is the second constructor, which calls this.
> Its
> >> >> second parameter - "new Model(text)",
> >> >>
> >> >> which I cannot generify. If I write "new Model(text)", I get an
> error:
> >> >> "The
> >> >> constructor Model(String) is undefined."
> >> >>
> >> >>
> >> >> I can't find out, what I am doing wrong.
> >> >>
> >> >>
> >> >> Thx
> >> >>
> >> >> Stefan Simik
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html
> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.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]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216943.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]
>
>

Reply via email to