[validator] bundle attribute of <arg> tag

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[validator] bundle attribute of <arg> tag

Simon Pettibone
I'm using commons-validator 1.1.4 (with Struts 1.2.4).  In my validation.xml
file, I have a test form defined as follows:

 

<form name="TestForm">

     <field property="color" depends="required">

          <msg key="errors.required" name="required" bundle="${bundle}"/>

          <arg key="test.color" name="required" bundle="${bundle}"
position="0" />

     </field>

</form>

 

When the required validation fails, it pulls the error message correctly
from the bundle that I've specified in the global constant "bundle."
However, it looks for the argument in the default resource bundle, instead
of the one that I've specified.  Is this a bug or is anyone aware of this?
Is there a work-around?  I want the argument to be pulled from the same
bundle that the message is in.

 

Simon

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: [validator] bundle attribute of <arg> tag

Niall Pemberton-2
Support for the "bundle" attribute in the validation configuration file (for
both <msg> and <arg> elements) has only just been added to Struts 1.2.7

http://struts.apache.org/userGuide/release-notes.html
http://svn.apache.org/dist/struts/v1.2.7/

Niall

----- Original Message -----
From: "Simon Pettibone" <[hidden email]>
Sent: Wednesday, May 11, 2005 8:35 PM


> I'm using commons-validator 1.1.4 (with Struts 1.2.4).  In my
validation.xml

> file, I have a test form defined as follows:
>
> <form name="TestForm">
>      <field property="color" depends="required">
>           <msg key="errors.required" name="required" bundle="${bundle}"/>
>           <arg key="test.color" name="required" bundle="${bundle}"
> position="0" />
>      </field>
> </form>
>
> When the required validation fails, it pulls the error message correctly
> from the bundle that I've specified in the global constant "bundle."
> However, it looks for the argument in the default resource bundle, instead
> of the one that I've specified.  Is this a bug or is anyone aware of this?
> Is there a work-around?  I want the argument to be pulled from the same
> bundle that the message is in.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [validator] bundle attribute of <arg> tag

Simon Pettibone
Uggh... missed it... thanks!  

-----Original Message-----
From: Niall Pemberton [mailto:[hidden email]]
Sent: Wednesday, May 11, 2005 6:22 PM
To: Jakarta Commons Users List
Subject: Re: [validator] bundle attribute of <arg> tag

Support for the "bundle" attribute in the validation configuration file (for
both <msg> and <arg> elements) has only just been added to Struts 1.2.7

http://struts.apache.org/userGuide/release-notes.html
http://svn.apache.org/dist/struts/v1.2.7/

Niall



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]