This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes help me regarding this selection box  problem... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic
Author

help me regarding this selection box problem...

Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
Hi,
In my struts application on one of my page I am displaying two drop-down boxes. One for "Group Name" & Other for "Sub-Group Name". Inside My form bean which loads JSP page, I am using A array of value object "GrpSubGrpData[]" for holding all the values of Groups & their correponding Subgroups from database. Now initially when I am displaying all the values of "Groups" in "groups" dropdown box. & Displaying nothing initially in Sub-Group menu. Now when user will click on any one of group in groups drop-down box, all the corresponding sub-groups should be displayed in "Sub-Group" drop-down box. Right now I am not getting any idea on how should I implement this. PLease give me some suggesions on how to solve this?
I am trying this since last two days. PLease help me.
Thank you in advance.
Pras


********Deserve Before You Desire********
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The subject of dependent select boxes comes up frequently. This thread gives you an idea of some of the options available.


Merrill
Consultant, Sima Solutions
Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
Hi,
I am also facing same problem as of Mitesh . Now I am trying to use solution Number-1 (One time database access - faster access). & I have 2 dropdowns & I am storing all the values of both the dropdown boxes into request scope. Now my problem is How should I display the content into second Drop-down box using Javascript?
I am displaying two drop-down boxes. One for "Group Name" & Other for "Sub-Group Name". Inside My form bean which loads JSP page, I am using A array of value object "GrpSubGrpData[]" for holding all the values of Groups & their correponding Subgroups from database. Now initially when I am displaying all the values of "Groups" in "groups" dropdown box. & Displaying nothing initially in Sub-Group menu. Now when user will click on any one of group in groups drop-down box, all the corresponding sub-groups should be displayed in "Sub-Group" drop-down box.
Now please tell me how should I use javascript here for populating second dropdown box?
PLease help me.
I am trying this since last 2 days but not succeeded so far.
Thank you in advance.
Pras
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Please do not post the same question in multiple locations. It wastes the time of those willing to respond.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: help me regarding this selection box problem...
 
Similar Threads
open a new window using struts2 button
Drop Down Box in Struts - Select Default Value Implementation
Dependent dynamic drop downs
After validation drop down box values will be lost.
onLoad in DispatchAction