To create a new Publisher selection list, use the ISelectionListManager and ISelectionList interfaces in the IDK.
Java
...
// Get a selection list manager object.
ISelectionListManager selectionListManager = factory.getSelectionListManager();
// Create a selection list representing the states in the United States.
String[] stateOptionValues = {"CA", "MA"};
ISelectionList stateSelectionList = selectionListManager.createSelectionList(rootFolder, "State Selection List", stateOptionValues);
stateSelectionList.store();
// Expand the list options.
String[] expandedStateOptionValues = {"OR", "NY"};
stateSelectionList.addValues(expandedStateOptionValues);
stateSelectionList.store();
// The list now contains "CA", "MA", "OR", and "NY."
// Remove the expanded options.
stateSelectionList.removeValues(expandedStateOptionValues);
stateSelectionList.store();
...
.NET (C#)
...
// Get a selection list manager object.
ISelectionListManager selectionListManager = factory.GetSelectionListManager();
// Create a selection list representing states in the United States.
String[] stateOptionValues = {"CA", "MA"};
ISelectionList stateSelectionList = selectionListManager.CreateSelectionList(folder,
"State Selection List", stateOptionValues);
stateSelectionList.Store();
// Expand the list options.
String[] expandedStateOptionValues = {"OR", "NY"};
stateSelectionList.AddValues(expandedStateOptionValues);
stateSelectionList.Store();
// The list now contains "CA", "MA", "OR", and "NY."
// Remove the expanded options
stateSelectionList.RemoveValues(expandedStateOptionValues);
stateSelectionList.Store();
...
.NET (VB)
...
' Get a selection list manager object.
Dim selectionListManager As ISelectionListManager = factory.GetSelectionListManager
' Create a selection list representing states in the United States.
Dim stateOptionValues() As String = {"CA", "MA"}
Dim stateSelectionList As ISelectionList = selectionListManager.CreateSelectionList(folder,
"State Selection List", stateOptionValues)
stateSelectionList.Store()
' Expand the list options.
Dim expandedStateOptionValues() As String = {"OR", "NY"}
stateSelectionList.AddValues(expandedStateOptionValues)
stateSelectionList.Store()
' The list now contains "CA", "MA", "OR", and "NY."
' Remove the expanded options
stateSelectionList.RemoveValues(expandedStateOptionValues)
stateSelectionList.Store()
...