Yes Decebal. You are right. If I have a TextField of some type but my model
is a generic one (in my case objectModel is of type Serializable), I have to
overwrite getConverter method like:

final TextField<String> textField = new TextField<String>("txtValue",
                new PropertyModel<String>(this, "objectModel")) {
                @Override
                        public <C> IConverter<C> getConverter(Class<C> type) {
                                return new AbstractConverter() {

                                        public Object convertToObject(String 
value, Locale locale) {
                                                return value;
                                        }

                                        @Override
                                        protected Class getTargetType() {
                                                return String.class;
                                        }
                                        
                                };
                        }
        };

This was not necessary in wicket 1.4. Something was changed in converters
area in wicket 1.5

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-ListMultipleChoice-add-Serializable-values-tp4585991p4586325.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]

Reply via email to