cancel
Showing results for 
Search instead for 
Did you mean: 

List uses multiselection : Exception

Former Member
0 Kudos
43

Hi experts,

I am developing an application where on 1st JSP a listbox is used whose model is set with SingleSelection property. When i select an entry from it, it should take me to next jSP with selected entry on it.

But it throws exception saying <b>List uses multiselection.</b>. Though i set model attribute to single selection,why then it throws this error?

I found below line is the cause of exception

objlistbox.selected = lb.getSingleSelection();

// selected is String declared in bean and lb is listbox object

if i use this line to get the selected entry, the exception is thrown.

any clues?

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

use

lb.getMultiSelection() and iterate and get the data u need.... i think there is problem with lb.getSingleSelection().

/*Reward if helpful

Answers (0)