You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Aroui, Dr. Djelloul" <Dj...@otto.de> on 2002/04/26 09:59:09 UTC
how can I set the values in the form of a iteration (logic:itera
te) on the select options (html:select)
Hi,
> 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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>