struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tushar Kharbanda <tushar0...@yahoo.co.in>
Subject < layout:optionsDependent > problem!!
Date Thu, 03 Jun 2004 06:45:13 GMT

In the code below what would be my ActionForm class,
and what all attributes will it have and of which type,
do we need a City class too.. 




I am gettin  an error HTML BEAN tag not found... so i
guess some prroblem with the jsp/form....

<layout:select key="Country" property="country" styleClass="FIELD">					<layout:option
value=""/>	<layout:options collection="countries" property="name" sourceOf="city"/></layout:select>
			<layout:select key="City" property="city" styleClass="FIELD">	<layout:optionsDependent
collection="cities" dependsFrom="country"/></layout:select>		


The model object is as follow: 

public class Country {	private String name;	private List cities = new ArrayList();		public
Country(String in_name) {		name = in_name;	}		public String getName() {		return name;	}		public
List getCities() {		return cities;	}		public void addCity(String in_city) {		cities.add(in_city);
}}					
A list of Country object is put directly in the request scope under the key "countries". 
The Struts form has 2 properties country and city. 


Yahoo! India Matrimony: Find your partner online.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message