In your onSubmit, link click, etc.:
try {
doDatabaseOperationThatThrowsContraintViolation();
transaction.commit();
}
catch(OrmSpecificException e) {
error("Something bad has happened. Read this if it helps you: " +
e.getMessage());
transaction.rollback();
return;
}
and make sure you have a feedback panel on the page. This is basically
a dumbed down version of how we do it in our application (or should
do, rather).
Martijn
On 9/29/07, mchack <[EMAIL PROTECTED]> wrote:
>
> Could someone provide a pointer/link as to the best mechanism to map DB
> constraint violations from Hibernate (or ORM layer) back to the user
> interface layer. I'm sure this has been solved but wasn't successful in
> searching for an answer.
>
> -Mike
> --
> View this message in context:
> http://www.nabble.com/Help---Best-Practice---Mapping-Database-Constraint-Violation-to-User-Interface-tf4539361.html#a12955404
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]