Hi,
as far as I remember I solved that by using one of the avalaible ACTF 
constructors with Class<T> type.

new AutoCompleteTextField<XYZ>("code", xYZTypeModel, renderer, XYZ.class)

Patrick

Am 14.05.2013 23:26, schrieb saty:
> I have used this before as a simple String model which works fine but with
> other types i have some isues going on any help would be appreciated.
>
> using:
>
> final AutoCompleteTextField<XYZ> something = new
> AutoCompleteTextField<XYZ>("code", xYZTypeModel, renderer)
>
> the options are displayed correctly selects fine too but
>
> XYZ.getObject() call throws exception:
>
> java.lang.ClassCastException: java.lang.String cannot be cast to XYZ
>
> not sure how it is able to Set String in a XYZ type.
>
>
> I am using below renderer
>
> IAutoCompleteRenderer<XYZ> renderer = new
> AbstractAutoCompleteTextRenderer<XYZ>()
>               {
>                       private static final long serialVersionUID = 1L;
>                       @Override
>                       protected String getTextValue(XYZ object)
>                       {
>                               return XYX.getDisplayText();
>                       }
>                       
>               };
>
> Thanks
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-issues-tp4658798.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

-- 
Mit freundlichen Grüßen,

Patrick Davids

NuboIT GmbH & Co. KG
Kieler Str. 103-107 • 25474 Bönningstedt

Email: [email protected]

Handelsregister: HRA6819 Pi  | Amtsgericht Pinneberg

Geschäftsführung der Verwaltungsgesellschaft
Daniel Fraga Zander

HRB10145Pi | Amtsgericht Pinneberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to