igor.vaynberg wrote:
>
> form {
> onsubmit() {
> try {
> users.persist(getmodelobject());
> } catch (usernamealreadyexistsexception e) {
> error("error.username.exists");
> }
> }
> }
>
> -igor
>
Thanks, it works like a charm. I did not know I could show an error message
by calling "Component.error" and then use a filter to catch all error
messages targeting a specific FormComponent.
--
View this message in context:
http://www.nabble.com/User-name-validation---how-to-check-database-to-find-if-a-name-has--already-been-taken--tp25614625p25682499.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]