Skip Ribbon Commands
Skip to main content

WDK

:

Code Samples: Retrieving multiselected values from listbox

Use the following code snippet to retrieve all the values selected in the control into a string array:

ListBox listbox = (ListBox) getControl("<control_name>",ListBox.class);

String[] selectedOptions = getPageContext().getRequest() .getParameterValues(listbox.getElementName());