You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ra...@wipro.com on 2004/10/05 07:45:21 UTC

RE: How to validate the indexed properties using the vaildation framework ?

Hi,
	Can anybody please help on this issue.

Regds
Ravi

-----Original Message-----
From: Vasu Johnson [mailto:vasujohnson@yahoo.co.in]
Sent: Tuesday, September 28, 2004 6:33 PM
To: Struts Users Mailing List
Subject: Re: How to validate the indexed properties using the vaildation framework ?



After browsing through the struts archives, I have done the following changes to validation.xml.

<form name="beanForm">

<field property="bd" indexedListProperty="lines"

depends="required">

<arg0 name="required" key="${var:bp}" resource="false"/>

<var>

<var-name>bp</var-name>

<var-value>bp</var-value>

</var>

</field>

</form>

No exceptions thrown, but the error is not getting fired. Not sure what could be the issue. Can someone help me please. Rick, can you pls help me.

Regds

Vasu Johnson

Vasu Johnson <va...@yahoo.co.in> wrote:
Hi,
I am using DynaValidatorForm. The entry in my struts-config.xml looks like :





Where, the Line class looks :
public class Line {
private String bId;
private String dId;
}

bId and dId are actually drop downs on the UI. Basically, when the jsp loads, the drop down will be filled with data. Now the requirement is, if the user do not select any item of both the drop-downs, I need to tell the user to select atleast one item in each of the drop-downs. The issue is, how to give the entry in validation.xml ? I tried giving the following, but it didnt work :

property="lines.bId" depends="required">


bp
bp


property="lines.dd" depends="required">


dp
dp




Can anybody help me how to solve this problem ? I had been struggling for almost a day on this.

Yahoo! India Matrimony: Find your life partneronline.

Yahoo! India Matrimony: Find your life partneronline.



Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org