No, I use normally the validator_1_0.dtd, but I need the bundle attribute for a new 
application. So I'm searching for a new version of commons-validation.jar and I find 
the link to the new version. I used it, but I got the message, that bundle is not 
supported by validator_1_0.dtd. Then I have replaced the version and I test it. The 
result was, that the new dtd contains the bundle attribute, but it was ignored.

I think struts validation doesn't use this attribute. I looked at struts 1.2 source 
and don't find the use of bundles. Struts always use the standard resource bundle.



-----Ursprüngliche Nachricht-----
Von: Adam Hardy [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 7. April 2004 11:03
An: Struts Users Mailing List
Betreff: Re: AW: AW: AW: AW: SV: validation with struts 1.2


I was actually asking about the DTD doctype reference - did you get it 
from an example? An example validation.xml file?

I am checking my problem - my validation works client-side except that I 
don't get the string from the bundle - just a ????en_US.blalblabla???

But server-side it is refusing to validate a date. It is throwing an 
exception before it gets to generate an ActionError. Shame the Americans 
won't be online for another few hours.


On 04/07/2004 10:57 AM Otto, Frank wrote:
> I have read in this mailing list a mail from Niall Pemberton on Thursday, April 01 
> with this content:
> 
> ------------------------------------------------------------------------
> http://www.apache.org/~martinc/struts/v1.2.0/
> 
> ----- Original Message ----- 
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, April 01, 2004 1:37 PM
> Subject: RE: Unhandled Exception in the Validator?
> 
> 
> Can anyone please tell me where I can get the Struts 1.2 Jar file?
> 
> It does not seem to be up at the Jakarta Site?
> 
> Thanks,
> VJ
> ------------------------------------------------------------------------
> 
> Sorry, it is my mistake. Please use the commons-validation.jar that the 
> jakarta-struts-1.2.0-lib contains and not this from 
> http://www.apache.org/~martinc/validator/v1.1.2/).
> 
> With the version 1.1.2 it didn't validate my form too.
> 
> 
> Regards,
> 
> Frank
> 
> 
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Adam Hardy [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 7. April 2004 10:41
> An: Struts Users Mailing List
> Betreff: Re: AW: AW: AW: SV: validation with struts 1.2
> 
> 
> OK, Frank, I've got the following below and it's not even attempting to 
>   validate. I haven't ruled out silly mistakes yet though.
> 
> Where did you get the validation.xml from? I'm interested because at no 
> point did I ever read that I should upgrade the dtd doctype to 1.1.
> 
> With 1.0 everything for me is fine, but no 'bundle' is accepted.
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!DOCTYPE form-validation PUBLIC
>    "-//Apache Software Foundation//DTD Commons Validator Rules 
> Configuration 1.1//EN"
>    "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd";>
> <form-validation>
>    <formset>
>      <form name="surveyForm">
>        <field property="dateLive"
>          depends="date">
>          <arg position="0" key="gargantusEmail"
>            bundle="ApplicationEnvironment.properties"/>
>          <var>
>            <var-name>datePattern</var-name>
>            <var-value>yyyy-MM-dd</var-value>
>          </var>
>        </field>
>      </form>
>    </formset>
> </form-validation>
> 
> 
> 
> On 04/07/2004 10:02 AM Otto, Frank wrote:
> 
>>I get no error, but it doesn't find the text in this resource bundle, which I 
>>declared.
>>
>>I use the commons-validation-1.1.2.jar 
>>(http://www.apache.org/~martinc/validator/v1.1.2/)
>>
>>And I take a look at the dtd. arg0 is deprecated.  Use <arg position="0"/> instead.
>>
>>-----Ursprüngliche Nachricht-----
>>Von: Adam Hardy [mailto:[EMAIL PROTECTED]
>>Gesendet: Mittwoch, 7. April 2004 09:46
>>An: Struts Users Mailing List
>>Betreff: Re: AW: AW: SV: validation with struts 1.2
>>
>>
>>I just updated my DTD declaration to validator-1.1 and now it is giving 
>>me some SAXParseException
>>
>>Attribute "bundle" must be declared for element type "arg0"
>>
>>This is new to me and I'll have to check it out. I now have a test 
>>validate.xml with only one form, one field and one arg, and that has the 
>>bundle attribute on it. Perhaps it wants me to specify what that bundle 
>>is somehow.
>>
>>Frank, what error do you get? Any exceptions?
>>
>>Adam
>>
>>On 04/07/2004 08:10 AM Otto, Frank wrote:
>>
>>
>>>Hi Adam,
>>>
>>>I use the validation.xml in this way:
>>>
>>><!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons 
>>>Validator Rules Configuration 1.1//EN" 
>>>"http://jakarta.apache.org/commons/dtds/validator_1_1.dtd";>
>>>
>>><form name="loginForm">
>>>     <field property="loginname" depends="required">
>>>             <arg0 key="label.loginname" bundle="login"/>
>>>             <msg name="required" key="error.required" bundle="login"/>
>>>     </field>
>>>     <field property="password" depends="required">
>>>             <arg0 key="label.password" bundle="login"/>
>>>             <msg name="required" key="error.required" bundle="login"/>
>>>     </field>
>>></form>
>>>
>>>
>>>Regards,
>>>
>>>Frank
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>>
> 
> 


-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to