Re: How to convert component model object to rendered HTML?

2015-03-05 Thread Thorsten Schöning
Guten Tag Thorsten Schöning, am Donnerstag, 5. März 2015 um 18:57 schrieben Sie: > Looks like I would need something simple like overriding > FormComponent.getValue, which is final... I found a simple workaround for me: Override onInvalid and getInputAsArray, in onInvalid I set an instance flag t

Re: How to convert component model object to rendered HTML?

2015-03-05 Thread Thorsten Schöning
Guten Tag Martin Grigorov, am Donnerstag, 5. März 2015 um 08:47 schrieben Sie: > You can call formComponent#clearInput() in #onError() callback method. > This way Wicket will use the last (valid) model value. This way I would loose the current input of the user? > You can also set custom model v

Re: How to convert component model object to rendered HTML?

2015-03-04 Thread Martin Grigorov
You can call formComponent#clearInput() in #onError() callback method. This way Wicket will use the last (valid) model value. You can also set custom model value in #onError() if you need. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Mar 5, 2015 at 9:39 AM

Re: How to convert component model object to rendered HTML?

2015-03-04 Thread Thorsten Schöning
Guten Tag Martin Grigorov, am Donnerstag, 5. März 2015 um 08:05 schrieben Sie: > 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. Thanks, I wasn't aware of this and that explains why it looked like it wo

Re: How to convert component model object to rendered HTML?

2015-03-04 Thread Martin Grigorov
Hi, On Wed, Mar 4, 2015 at 11:21 PM, Thorsten Schöning 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 > su

How to convert component model object to rendered HTML?

2015-03-04 Thread Thorsten Schöning
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 C