From issues-return-10354-apmail-struts-issues-archive=struts.apache.org@struts.apache.org Fri Jun 13 01:06:29 2008 Return-Path: Delivered-To: apmail-struts-issues-archive@locus.apache.org Received: (qmail 38096 invoked from network); 13 Jun 2008 01:06:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jun 2008 01:06:28 -0000 Received: (qmail 86509 invoked by uid 500); 13 Jun 2008 01:06:29 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 86445 invoked by uid 500); 13 Jun 2008 01:06:28 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 86425 invoked by uid 99); 13 Jun 2008 01:06:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 18:06:28 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jun 2008 01:05:47 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CB819234C142 for ; Thu, 12 Jun 2008 18:06:05 -0700 (PDT) Message-ID: <240800641.1213319165832.JavaMail.jira@brutus> Date: Thu, 12 Jun 2008 18:06:05 -0700 (PDT) From: "Don Brown (JIRA)" To: issues@struts.apache.org Subject: [jira] Updated: (WW-1770) Better control over field conversion errors than invalid.fieldvalue.xxx In-Reply-To: <24994922.1172526316511.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.