Ashish,

I think you want to change your <arg ... /> to include a bundle="approvals"
and resource="true" to use the key name dapproval.006 from the "approvals"
message bundle.  See the javadoc for the commons validator at:

http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/valid
ator/Arg.html

Additionally, this might only work with the Commons validator 1.1.3 which is
available in Struts v1.2.4 release.  I don't have any idea if it works in
1.1 or 1.0.

Regards,
David

-----Original Message-----
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 6:27 PM
To: [EMAIL PROTECTED]
Subject: struts validation and resource file


Hi
Can i specify which message resource should be used to
get the text when performing validation?
I hit the follwoing problem

In my struts-configxml i have defined 2 resource files
like
<message-resources key="approvals"
parameter="approval"/>

<message-resources
key="org.apache.struts.action.MESSAGE"
parameter="main" />

and in my validation.xml file i have the following
validation
<field property="userId" depends="required" >
  <arg0 key="approval.006"  />
</field>
where key approval.005 is from resource file
approvals,
but struts is not able to get the replace the value
during validation, on screen i get error message as
"approval.006 is required"


Ashish




_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

---------------------------------------------------------------------
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