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]
>
>

Reply via email to