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

Reply via email to