You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gede Indrawan <ge...@gratika.co.id> on 2003/12/01 11:39:13 UTC

Drop-down-list

Hi all,

In case I have 2 drop-down-lists and the second drop-down-list content
changed automatically if we select certain item at the first one,
how can I do it in the struts world? Any references to this case? Any code
example?

I am totally blind to this case..

best regards
-GI.


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


Re: Drop-down-list

Posted by Gede Indrawan <ge...@gratika.co.id>.
Hi Firat, thanx for the response,

But in more spesific case, consider I have 2 bussiness object:
- Machine contains property: int machineId, String machineName
- Location contains property: int locationId, String locationName,
Collection machines (instatiated as new ArrayList() contains Machine(s))

I have Collection locations (instantiated as new ArrayList() contains
Location(s)) with data from database and save it to the request or session,
and has listed successfully at drop down list using code below at jsp page.

<tr>
<td><bean:message key="addLogBook.location" /></td>
<td>
<html:select name="logBookForm" property="location.locationId">
<html:options collection="locations" property="locationId"
labelProperty="locationName"/>
</html:select>
</td>
</tr>

How can I make the second drop down list dynamically changes depend on what
Item selected at first drop down list?
The second drop down list contains Collection machines of Location.

Notes: logBookForm I configured as DynaValidatorForm.

Thanx for your help guys.
-GI.

----- Original Message -----
From: "Firat TIRYAKI" <fi...@pleksus.com.tr>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, December 01, 2003 5:44 PM
Subject: Re: Drop-down-list


> You can directly do it using javascript, refer to the below URL for a
> detailed example
>
> http://www.jguru.com/faq/view.jsp?EID=923880
>
> F.
>
> ----- Original Message -----
> From: "Gede Indrawan" <ge...@gratika.co.id>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Monday, December 01, 2003 12:39 PM
> Subject: Drop-down-list
>
>
> > Hi all,
> >
> > In case I have 2 drop-down-lists and the second drop-down-list content
> > changed automatically if we select certain item at the first one,
> > how can I do it in the struts world? Any references to this case? Any
code
> > example?
> >
> > I am totally blind to this case..
> >
> > best regards
> > -GI.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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


Re: Drop-down-list

Posted by Firat TIRYAKI <fi...@pleksus.com.tr>.
You can directly do it using javascript, refer to the below URL for a
detailed example

http://www.jguru.com/faq/view.jsp?EID=923880

F.

----- Original Message ----- 
From: "Gede Indrawan" <ge...@gratika.co.id>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, December 01, 2003 12:39 PM
Subject: Drop-down-list


> Hi all,
>
> In case I have 2 drop-down-lists and the second drop-down-list content
> changed automatically if we select certain item at the first one,
> how can I do it in the struts world? Any references to this case? Any code
> example?
>
> I am totally blind to this case..
>
> best regards
> -GI.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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