struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aroui, Dr. Djelloul" <Djelloul.Ar...@otto.de>
Subject how can I set the values in the form of a iteration (logic:iterat e) on the select options (html:select)
Date Thu, 25 Apr 2002 16:05:30 GMT
Vehiclepark is a Bean with the property cars (cars is a collection of a
Car). 

Car is a bean with the properties id and vehicleparkId 

hier ist my jsp-code 

<logic:iterate name="Vehiclepark" property="cars" id="Car"> <html:hidden
name="Car" property="id" indexed="true"/> <html:select name="Car"
property="vehicleparkId" indexed="true"> <html:options
name="allvehicleparkid "/> </html:select> </logic:iterate> 

and hier ist my VehicleparkForm: 

ArrayList cars = new ArrayList(); public ArrayList getCars() { return cars;
} public void setCars(ArrayList cars) { this.cars = cars; } public Car
getCars(int index) { return (Car) cars.get(index); } public void setCars(int
index, Car car) { cars.set(index,car); } 

and hier ist my VehicleparkAction: 

I call this method vehicleparkForm.getCars() but I receive size()=0 nothing
is saving in the form. 

I want to change the vehicleparkid and save the data in the form. How can I
do it? 

Please Help



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


Mime
View raw message