Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 74835 invoked from network); 1 Sep 2004 07:43:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Sep 2004 07:43:54 -0000 Received: (qmail 60894 invoked by uid 500); 1 Sep 2004 07:43:49 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 60841 invoked by uid 500); 1 Sep 2004 07:43:48 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 60827 invoked by uid 99); 1 Sep 2004 07:43:48 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 01 Sep 2004 00:43:48 -0700 Received: (qmail 14752 invoked by uid 50); 1 Sep 2004 07:45:30 -0000 Date: 1 Sep 2004 07:45:30 -0000 Message-ID: <20040901074530.14751.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 16920] - Declaration of Locale (language/country) in validation.xml ignored X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.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://issues.apache.org/bugzilla/show_bug.cgi?id=16920 Declaration of Locale (language/country) in validation.xml ignored ------- Additional Comments From nacho@visual-ma.com 2004-09-01 07:45 ------- I opened a related bug with id 30955. The nature of the bug is different but the origin is the same. The problem is the way formsets are processed. I have made a patch which solves this problems and passes all the other tests with no performance loss (I ran the test suite 5 times and actually there is a few seconds average gain, but I am testing on Windows...). It involves a few changes, but I am quite sure any solution proposed would involve a bit of change. The basic idea is to establish a Locale Hierarchy, being the defaultFormSet (which is no longer needed - it's a sort of virtual root) the root element with language aware only children which has language and country aware children and so on. The formSet repository is still flat based (Map), but the processing of formSets is "sort of" recursive. A merge method has been implemented for both forms and formsets. A language only aware formset has to be merged with the defaultformset. The language and country aware formsets have to be merged with its parent formset only (that is a language only aware formset with the same language) which has itself been merged with its parent. Of course, before merging with its parent, we ought to check if its parent has already been merged too. When merging, we only add the fields that are not present on the current form. I am attaching the patch in http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=12588. see http://issues.apache.org/bugzilla/show_bug.cgi?id=30955 It would be nice if those of you that noticed this bug sent the validation.xml so we can test against them (real world tests are always better). --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org