Two Laptop Bag
The moose likes Struts and the fly likes select all in list box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "select all in list box" Watch "select all in list box" New topic

select all in list box

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
I have a struts 2 list box, want to create button or link for "select all items" for user to click and select all the items in the list box. How to do that ? any example ?
Roberto Hernandez
Ranch Hand

Joined: Apr 29, 2009
Posts: 33
I guess you'll have to do this with javascript. See this example.
First, make sure you give your listbox an id attribute;

Then, you can invoke this function when the user clicks on the button
I agree. Here's the link:
subject: select all in list box
It's not a secret anymore!