Hi,
On Wed, Mar 4, 2015 at 11:21 PM, Thorsten Schöning <[email protected]> wrote: > Hi all, > > I have my own subclass of RequiredTextField for very specific reasons > and need to convert input after form submit to a Wicket model and vice > versa from a Wicket model to a form input value in case of errors and > such, when Wicket renders the form with the current values. I have > overridden Component.getConverter and can see that convertToObject of > my implementation is called, but not convertToString. Instead Wicket > renders exactly that data which it got submitted by the form, but is > not what I need to show to the user. > > Any idea on where I have a problem? Thanks! > FormComponent have two models - the model that every component has and input (raw & converted). During form submit processing the raw input (the request parameter as String) is converted to the type of the model, here #convertToObject() is used. Next step in the processing is validation, the converted input is given to all registered IValidators and if all checks pass then finally the converted input is set as a model object/value. If the validation fails then the *raw* input is rendered to the user and there is no usage of #convertToString() because there is no need. > > Mit freundlichen Grüßen, > > Thorsten Schöning > > -- > Thorsten Schöning E-Mail: [email protected] > AM-SoFT IT-Systeme http://www.AM-SoFT.de/ > > Telefon...........05151- 9468- 55 > Fax...............05151- 9468- 88 > Mobil..............0178-8 9468- 04 > > AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln > AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
