Return-Path: Delivered-To: apmail-jakarta-struts-dev-archive@apache.org Received: (qmail 52974 invoked from network); 18 Mar 2003 09:39:27 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 18 Mar 2003 09:39:27 -0000 Received: (qmail 20086 invoked by uid 97); 18 Mar 2003 09:41:23 -0000 Delivered-To: qmlist-jakarta-archive-struts-dev@nagoya.betaversion.org Received: (qmail 20079 invoked from network); 18 Mar 2003 09:41:22 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 18 Mar 2003 09:41:22 -0000 Received: (qmail 52383 invoked by uid 500); 18 Mar 2003 09:39:21 -0000 Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 52366 invoked from network); 18 Mar 2003 09:39:20 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 18 Mar 2003 09:39:20 -0000 Received: (qmail 20073 invoked by uid 50); 18 Mar 2003 09:41:16 -0000 Date: 18 Mar 2003 09:41:16 -0000 Message-ID: <20030318094116.20072.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: struts-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 18094] New: - validate method on ValidatorForm should use mapping.getName as key to validator X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18094 validate method on ValidatorForm should use mapping.getName as key to validator Summary: validate method on ValidatorForm should use mapping.getName as key to validator Product: Struts Version: Nightly Build Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: Other Component: Validator Framework AssignedTo: struts-dev@jakarta.apache.org ReportedBy: poul-bildsoe.moller@cgey.com In the validate method of the ValidatorForm mapping.getAttribute() is used as a key when initialising the Validator based on the definition entered in the validation.xml file. This doesn't make sense, since what defines a form is the name key and not under which key it is stored on the request (or session). Most people wouldn't notice the problem as they use the same token as attribute and name. I needed to decouple the key under which my forms are stored from the individual form (I use request scope, and static jsp-includes, so I needed to be able to group several different forms under same request key (because of the static jsp-includes)). When I gave all my forms the same attribute in the part of the struts-config.xml I found that all my validations had disappeared. This is not a major problem, since I have my own BaseForm 'below' the ValidatorForm and thus where able to make my own implementation: Validator validator = Resources.initValidator(mapping.getName (),this,application, request,errors, page); --------------------------------------------------------------------- To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-dev-help@jakarta.apache.org