Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use Validation.xml for Action Form that contains object Type ?

Status
Not open for further replies.

kingg26

MIS
Jan 8, 2004
2
US
My action form just contains one attribute of type Profile. Profile has an attribute address that is of type Address. If i want to validate City, how do I do it using validation.xml file. If I use . (dot) to navigate from profile to Address, property attribute wont recognize it. I strictly want to use validation.xml file to do that.
-----------------------------------------------------
public final class profileForm extends ActionForm{

private Profile profile;

}

public class Profile {

String name
String phoneNumber
Address address

}


public class Address {

String Street;
String City;
String State;
String Zip;

}

This code is not working for us.
-----------------------------------------------------------
<form name="profileForm">
<field property="address.city" depends="required">
<arg key="profileForm.address.city" position="0"/>
</field>
</form>
-----------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top