You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Don Brown (JIRA)" <ji...@apache.org> on 2008/06/13 03:06:05 UTC

[jira] Updated: (WW-1770) Better control over field conversion errors than invalid.fieldvalue.xxx

     [ https://issues.apache.org/struts/browse/WW-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown updated WW-1770:
--------------------------

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

> Better control over field conversion errors than invalid.fieldvalue.xxx
> -----------------------------------------------------------------------
>
>                 Key: WW-1770
>                 URL: https://issues.apache.org/struts/browse/WW-1770
>             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 invalid.fieldvalue.xxx, 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 :
> invalid.path.to.Exception.xxx
> where path.to.Exception 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.