Generally when a field validation fails, the user's raw input is
re-rendered instead of the original model value. This lets the user correct
his input instead of retyping the whole thing. Since this is not the
behavior you want, you can call firstName.clearInput() in your onError().

On Mon, Apr 30, 2012 at 12:45 AM, meduolis <[email protected]> wrote:

> Hello this is quick start project which reproduces my case"
> http://apache-wicket.1842946.n4.nabble.com/file/n4597599/project.zip
> project.zip
>
> The problem is, that I cannot set value for object after form validation
> fails.
>
> How to reproduce:
> 1. Startup my quicstart app;
> 2. Do not fill required field and press Save;
> 4. Validation error occurs, that field is required;
> 3. Press "Set name"; (this should set first name to "John Doe" and
> refresh);
>
> Expected result: input field sets to "John Doe";
>
> Actual result: nothing happens;
>
> Does anyone knows what I am doing wrong? :)
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Setting-value-to-object-when-validation-failed-tp4597599.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