Converters are (in 1.3 especially) are String -> X (or X -> String) so browser string input converted to a model value. So how do you already get an integer? Because that should be converted by a converter already.
johan On Nov 28, 2007 11:34 AM, Pills <[EMAIL PROTECTED]> wrote: > > Hello, > > I've a textfield that accept an integer (it represents a foreign key). > > I would like it to be converted as an instance of MyClass before updating > my > model. > > But I don't know how to specifiy a custom converter for a field... > > I would like to implement this converter like this: > <code> > Integer i = (Integer) myfield.getValue(); > MyClass m = new MyClassDAO().findById(i); > return m; > </code> > > Is it possible? > -- > View this message in context: > http://www.nabble.com/Use-a-custom-converter-%28IntegerToMyClass%29-tf4887609.html#a13989621 > Sent from the Wicket - User mailing list archive at > Nabble.com<http://nabble.com/> > . > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
