Skip to Content
author's profile photo
Former Member

List uses multiselection : Exception

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,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 01:52 PM

    use

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

    /*Reward if helpful

    Add comment
    10|10000 characters needed characters exceeded