Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SelectItem.getSelection?

    Using a SelectItem where setMultiple is True, how can I get all selected records? Calling SelectItem.getSelectedRecord() only returns the first selected item. I am looking for something similar to ListGrid.getSelection. Any advice on how to accomplish this?

    Thanks

    #2
    rkumsher,

    The answer to your question is "getValues()". At first this might seem like it will return you the list of values in the value map. However, if you look at the javadoc, it is indeed the String[] of selected items.

    I don't see a way to get the value maps directly from the api, but if you call getAttributeAsMap("valueMap"), you should be good (or if you want, I think you can use getAttributeAsStringArray).

    Hope this helps.

    Comment

    Working...
    X