[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Dynamic drop-down menu in Struts

Posted on 2004-08-23
6
Medium Priority
?
826 Views
Last Modified: 2008-02-01
Dear Experts,

I want to create dynamic-dropdown menu in Struts.

Say, I have Department, Teams and Members.

I need to populate Teams based on the Department selection and Members based on the Teams selection.  At first thought, I was about to post in JavaScript section. But, just want to know if anyone has accomplished similar task in Struts.

<TR>

<TD><bean:message key="FilterList.department"/></TD>
<TD colspan="3" >
<html:select property="department" onchange="deptSelected();" >
<html:option value="Department A"> Department A </html:option>
<html:option value="Department B"> Department B </html:option>
</html:select>
</TD>

</TR>

<TR>

<TD valign="top" ><bean:message key="FilterList.teams"/></TD>
<TD>
<html:select multiple="true" property="teams" onchange="teamSelected();">
</html:select>
</TD>

<TD valign="top" ><bean:message key="FilterList.members"/></TD>
<TD>
<html:select multiple="true" property="members">
</html:select>
</TD>

</TR>

Please share me if you have any suggestions.

Thanks.
0
Comment
Question by:ldbkutty
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 35

Assisted Solution

by:girionis
girionis earned 200 total points
ID: 11868448
You can do a separate request to the database for each option selected. All you can load everything up at once, put them in a JavaScript array and dynamically change the values. Up to you, it's not really a Struts issue.
0
 
LVL 92

Assisted Solution

by:objects
objects earned 200 total points
ID: 11868477
0
 
LVL 3

Accepted Solution

by:
Gunt earned 1600 total points
ID: 11876063
http://providers.sourceforge.net/
It's a framework for handling that kind of things. Supports dynamic combos and the such.

Might help you.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 32

Author Comment

by:ldbkutty
ID: 11876150
that was excellent. :-)
Thanks to all.
0
 
LVL 92

Expert Comment

by:objects
ID: 11876172
0
 
LVL 35

Expert Comment

by:girionis
ID: 11878434
:)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question