You might want to subclass Form to retain additional state. It could save the validation errors and put them back onto components in onBeforeRender, clearing them when validation is eventually successful. This could probably also be accomplished with a Behavior.
On Wed, Apr 11, 2012 at 7:19 AM, Thomas Götz <t...@decoded.de> wrote: > Hi! > > I have the following situation (Wicket 1.5.5): > > - a Form with a TextField<String> with some Validator > - you input invalid data and submit -> error message, fine. > - (invalid) rawInput is shown in the TextField, fine. > - now I do a page reload, invalid rawInput still in the TextField, but no > error message shown > > What I'd like to achieve is that upon a page reload the (invalid) rawInput > is shown in the TextField, but the error message also needs to be shown > again. How can this be done? > > I already tried to trigger validation manually by calling > formComponent.validate(), but this calls > AbstractTextComponent.convertInput(), which tries to pull the input data > from the request (and there is no data because of page reload, so > validation won't fail …). > > Cheers, > -Tom > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >