/, LiveSite/Getting MultipleSelect values in a Java External

It is often useful to setup a “Multi-Select Datum” in a LiveSite component, but how do you write the Java external to receive this array of parameters?

The following code snippet from Raj Shekhawat shows you how:

//LiveSite returns Multiple select values in the form of ArrayList object
//Searchproperties is my parameter name
 ArrayList selectedProperties= (ArrayList) context.getParameters().get("SearchProperties");

String selectedValues = "";
Iterator propertiesIterator = selectedProperties.iterator();
 while (propertiesIterator.hasNext()) {
             selectedValues += propertiesIterator.next();
}
By |2008-09-23T23:24:50+00:00September 23rd, 2008|Java, LiveSite|0 Comments

About the Author: