Subject: Re: Multiple Selects in a JSP
From: "Pim" <[EMAIL PROTECTED]>
 ===
>From "Using Struts":
http://stealthis.athensgroup.com/presentations/Model_Layer_Framework/Struts_
Whitepaper.pdf

"Dependent Drop-Down Combo Box Lists
In many situations, you will have two combo boxes, with the contents of the
second
dependent on the value selected in the first. That is, each item in the
first combo box is
associated with a list. To handle this, you need for the first combo box to
do a submit
when it changes, so that you have a chance to update the second. You do this
with:

<html:select property="orgId" onchange='document.forms[0].submit()'>
<html:options collection="orgList" property="value"
labelProperty="longName"/>
</html:select>

In this example, the property "value", of the beans in orglist are
orgIds and the "labelProperty" property is the name to display. When
you are in your action class the first time, the orgId string property
of your form bean will be null or blank. In subsequent submissions the
orgId property of your form bean will contain a valid orgId, so that
you can look up the list associated with that value, and thus populate
the second drop-down combo box propery.
Radio Button Input"

Gr,

Pim

"Ken Holzer" <[EMAIL PROTECTED]> wrote in message
news:a7qs8p$p2o$[EMAIL PROTECTED]...
> I have two selects in my JSP and I want to be able to dynamically change
the
> options of the 2nd select based on the choice selected from the 1st
select.
>
> Is there a way to do that using the Struts tags?
>
> Thanks,
>
> Ken
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to