You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Agent Mahone <ma...@yahoo.de> on 2009/02/05 22:16:02 UTC

java.lang.ClassCastException in ListMultipleChoice

Hi guys, I have a simple question.

I´m using a ListMultipleChoice in my form.
The selected items should be binded to "Car.color" as "List<Car> cars".

If I bind the ListMultipleChoice to "cars", I´ll get a java.lang.ClassCastException
because wicket trys to map a List<String> to List<Car>.

java.lang.ClassCastException: java.lang.String cannot be cast to com.***.***.Car

Any ideas???

Thanks for your help



      

RE: java.lang.ClassCastException in ListMultipleChoice

Posted by Stefan Lindner <li...@visionet.de>.
And a little bit of example's code too.

-----Ursprüngliche Nachricht-----
Von: tomlist0408@gmail.com [mailto:tomlist0408@gmail.com] Im Auftrag von Thomas Mäder
Gesendet: Donnerstag, 5. Februar 2009 23:38
An: users@wicket.apache.org
Betreff: Re: java.lang.ClassCastException in ListMultipleChoice

Stack trace please?

On Thu, Feb 5, 2009 at 10:16 PM, Agent Mahone <ma...@yahoo.de> wrote:

> Hi guys, I have a simple question.
>
> I´m using a ListMultipleChoice in my form.
> The selected items should be binded to "Car.color" as "List<Car> cars".
>
> If I bind the ListMultipleChoice to "cars", I´ll get a
> java.lang.ClassCastException
> because wicket trys to map a List<String> to List<Car>.
>
> java.lang.ClassCastException: java.lang.String cannot be cast to
> com.***.***.Car
>
> Any ideas???
>
> Thanks for your help
>
>
>
>




-- 
Thomas Mäder
Wicket & Eclipse Consulting
www.devotek-it.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: java.lang.ClassCastException in ListMultipleChoice

Posted by Thomas Mäder <th...@devotek-it.ch>.
Stack trace please?

On Thu, Feb 5, 2009 at 10:16 PM, Agent Mahone <ma...@yahoo.de> wrote:

> Hi guys, I have a simple question.
>
> I´m using a ListMultipleChoice in my form.
> The selected items should be binded to "Car.color" as "List<Car> cars".
>
> If I bind the ListMultipleChoice to "cars", I´ll get a
> java.lang.ClassCastException
> because wicket trys to map a List<String> to List<Car>.
>
> java.lang.ClassCastException: java.lang.String cannot be cast to
> com.***.***.Car
>
> Any ideas???
>
> Thanks for your help
>
>
>
>




-- 
Thomas Mäder
Wicket & Eclipse Consulting
www.devotek-it.ch