You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/09/01 09:45:30 UTC
DO NOT REPLY [Bug 16920] -
Declaration of Locale (language/country) in validation.xml ignored
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=16920>.
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