The following comment has been added to this issue:
Author: Christian Bj�rnbak
Created: Wed, 1 Dec 2004 3:12 AM
Body:
Now the code is done and the javadoc's commented corrected....
See the attachment.
I have changed StrutsDynaFormValidatorTagsHandler also eventhough I haven't
tested it yet as I've newer used DynaForms before.
Could somebody please test it for me and/or send me and example of a working
class with dynaform tags??
How do I change the documentation of the @strus:validator,
@strus:validator-args and @strus:validator-var???
In short: I you add a locale parameter to one of these tags XDoclet will now
dynamicly add several formset's to validation.xml
The format of the locale parameter is:
"all"/""/null
or
"default"
or
"<ll>"
or
"<ll>_<cc>"
or
"<ll>_<cc>_<vv>"
Where:
- all, empty string or no locale means this tag (@strus:validator,
@strus:validator-args and @strus:validator-var) affects all locales.
- default means this tag affects all locales where no sibling tags override it.
- <ll> is the language e.g. 'en'
- <cc> is the country e.g. 'US'
- <vv> is the variant
---------------------------------------------------------------------
View this comment:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1162?page=comments#action_15395
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1162
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XDT-1162
Summary: Make strutsvalidationxml and create multiple <formset>'s in
validation.xml
Type: Improvement
Status: Open
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: XDoclet
Components:
Apache Module
Versions:
1.2.2
Assignee: xdoclet-devel (Use for new issues)
Reporter: Christian Bj�rnbak
Created: Thu, 18 Nov 2004 11:44 PM
Updated: Wed, 1 Dec 2004 3:12 AM
Description:
Struts supports localized validation by having multiple <formset>'s in
validation.xml - one for each "known" locale and one fallback/default for
"unknown" locales.
E.g.
validation.xml:
...
<formset>
...
</formset>
<formset language="en" country="GB">
...
</formset>
<formset language="da">
...
</formset>
...
In the default <formset> you insert the default validation rules and then only
overrides the changed rules in the various localized <formset>'s. In the above
example that could be override the postalcode format in the british locale and
the postal code and date formats in the danish locale.
This is great for validation of localized input like dates and floats, but
isn't supported by XDoclet that will only create the default <formset>...
I was thinking of the following design:
Adding a parameter to @struts.validator; locale. Containing a Java style locale
string like "en_US".
Then I'll extend validation_xml.xdt and StrutsValidatorTagsHandler to do the
following:
1. Find all the validators without locale and create the default <formset>.
(Almost the current behaviour).
2. Find all the locales used in all classes.
3. Foreach locale create a <formset> containing only the validator's different
from the default.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel