p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Jakarta Struts (http://p2p.wrox.com/forumdisplay.php?f=117)
-   -   Using Validator for Action Form containing type (http://p2p.wrox.com/showthread.php?t=29723)

kingg26 May 24th, 2005 10:31 PM

Using Validator for Action Form containing type
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 me.
<form name="profileForm">
<field property="address.city" depends="required">
<arg key="profileForm.address.city" position="0"/>

ms_shilpa April 7th, 2006 07:18 AM

may be u have mention city as small case, try to give address.City. this may work not tried.

All times are GMT -4. The time now is 07:07 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.