struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown (JIRA)" <>
Subject [jira] Updated: (WW-1770) Better control over field conversion errors than
Date Fri, 13 Jun 2008 01:06:05 GMT


Don Brown updated WW-1770:

    Fix Version/s:     (was: 2.1.x)

> Better control over field conversion errors than
> -----------------------------------------------------------------------
>                 Key: WW-1770
>                 URL:
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.0.6
>            Reporter: Sami Dalouche
>            Priority: Minor
>             Fix For: Future
> Any Application Design that follows a rich-domain paradigm (e.g. Domain Driven Design)
will necessarily implement business validation rules in domain entities. Some Integrity-checking
rules can be implemented as "throw new WhateverBusinessException()" right in the object mutators
(aka setters) to avoid having an undefined object state.
> Since Struts2/XWork/OGNL is supposed to help binding data directly to domain entities,
it seems natural to help the application report the correct errors to the user. However, if
a setter throws an exception, the only customizable message is, which
means that if the setter can throw 10 exceptions, only one generic message can be displayed
to the user.
> As a result, it would  be useful to be able to customize the error message using the
exception thrown, and not just the field name Something such as :
> where is the FQ class name, and xxx is the field name.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message