I am sorry I wasn't clear enough in my reply. Here's what you need to do: String explainUrgency = field.getVarValue("explainUrgency"); String whatever = ValidatorUtils.getValueAsString(bean, explainUrgency);
Harsh. -----Original Message----- From: Yildiz Terkesli [mailto:[EMAIL PROTECTED] Sent: Thursday, May 25, 2006 2:04 PM To: user@struts.apache.org Subject: How Validation framework's getVarValue method works? Hi, I am using Apache Struts and Validator framework for my current project. I have encountered this problem when I tried to create my own validation rule: I want to validate a field against another field. For this purpose I have created my own validation method, created new XML file instead of changing the original validator-rules.xml file, and updated validation.xml file. Everything has been fine so far. I have configured validation for the new rule in validation.xml as follows: <field property="priority" depends="urgency"> <arg0 key="prompt.urgency"/> <var> <var-name>explainUrgency</var-name> <var-value>urgency</var-value> </var> </field> Here, the name of first field is "priority" and the second is "urgency". When I use: String explainUrgency = field.getVarValue("explainUrgency"); in my own validation method to get the real value of the field urgency, I get the text "urgency". What should I do to get the value of the field "urgency" in the form? Any help is appreciated. Thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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]