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...
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
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
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
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
5 matches
Mail list logo