This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes GWT and the fly likes need an index of latest item choosen with ListBox Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » GWT
Reply Bookmark "need an index of latest item choosen with ListBox" Watch "need an index of latest item choosen with ListBox" New topic
Author

need an index of latest item choosen with ListBox

sayto chinni
Greenhorn

Joined: Mar 14, 2008
Posts: 1
The ordinal index of the selected option, starting from 0. The value -1 is returned if no element is selected. If multiple options are selected, the index of the first selected option is returned.

I face issue while prihibiting the multiselect option with the help of control key.
List box should not be even the multiselect box,


int index = ((XXXListBox) event.getSource()).getSelectedIndex();

Here the index returned is index of the first selected option is returned. what can be done inorder to get index of last choosen item in the list of items, if multiple items are choosen with the help of contorl key or dragging continuously.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need an index of latest item choosen with ListBox
 
Similar Threads
How to get total count of selected Items of <Select>
adding a SelectItem object at particular index position in java.util.list
Unable to Apply style to the Select Box Through Ajax
retrieving list (multiple select on the form) values into servlet!!!
MULTIPLE select - list box - how to read in servlet