logic:iterate ... logic:equal question?

2004-02-02 Thread Derek Colley
Apologies for this newbie question... I have 2 selections: Country and City I have 2 collections in session (CityList contains a reference to Country) I don't want the user to select a City before selecting a Country and I want to display a list of Cities that relate to the selected Country...

Re: logic:iterate ... logic:equal question?

2004-02-02 Thread Jiin-Her Lu
you can do as following. countryCollection is an ArryList with object of struts' LabelValueBean. The value is the country code and label is the country name for example. Once the user changes the country selection, it will submit the change to server so that the action can generate the city

Re: logic:iterate ... logic:equal question? SELECTED ATTRIBUTE

2004-02-02 Thread Jino Morgan
How does one add selected attribute if I want one the option to have the SELECTED attribute --- Jiin-Her Lu [EMAIL PROTECTED] wrote: you can do as following. countryCollection is an ArryList with object of struts' LabelValueBean. The value is the country code and label is the country name

RE: logic:iterate ... logic:equal question? SELECTED ATTRIBUTE

2004-02-02 Thread Derek Colley
Struts does this for you if the value of the SELECT parameter equals the OPTION... Derek -Original Message- From: Jino Morgan [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 17:48 To: Struts Users Mailing List Subject: Re: logic:iterate ... logic:equal question? SELECTED

Re: logic:iterate ... logic:equal question? SELECTED ATTRIBUTE

2004-02-02 Thread Jiin-Her Lu
In you ActionForm java class, you have to define the selectedCountry instance variable. For example public MyForm extends ActionForm { private String [] selectedCountry = {}; // if the option is multiple selection (check box or multiple selection listbox) // private String