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 group of checkboxes with multi select dropdown 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
Bookmark "group of checkboxes with multi select dropdown" Watch "group of checkboxes with multi select dropdown" New topic
Author

group of checkboxes with multi select dropdown

Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
I need to design a control on Struts UI page with following functionalities.

* I have two attributes: Region, office. I have to design following tree structure on UI
+Region 1 (checkbox)
office1 (checkbox)
office2 (checkbox)
office3 (checkbox)
+Region 2 (checkbox)
office1 (checkbox)
office2 (checkbox)

Based on above UI (which I don't quite sure how to achieve in multi select dropdown) if user selects office1 thenregion1 should get selected automatically. If user selects Region 2 then it should select all offices underneadh automatically.

can anyone guide me how do i go achieve these two functionalities
first to auto select things and second how do I build this kind of UI (multi select , multi select in drop down). Any help with code examples would be much appreciated.

Thanks,
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
Can anyone suggest any solution with example??
Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

Hi vicky
just try to write a java script on the "region1 aS WELL AS REGION 2 "' SEPERATELY .
in respective event and enable the child checboxes
.
If u submit u will get all values checked in ur form bean or action class
Thanks
Gowtham
grgowtham_cse@yahoo.com


Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
 
 
subject: group of checkboxes with multi select dropdown
 
Similar Threads
How to make text fields appear when checkbox is selected
sbmission of form through javascript
Lisbox validation in struts
ice:selectOneMenu not refreshing
Error handling in Struts