AquaLogic User Interaction Development Guide

     Previous Next  Open TOC in new window   View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Creating Publisher Selection Lists Using IDK Remote APIs

To create a new Publisher selection list, use the ISelectionListManager and ISelectionList interfaces in the IDK.

The ISelectionListManager interface can be used to create a new selection list or retrieve existing selection list(s). The ISelectionList interface returned by ISelectionListManager can be used to add or remove values in a selection list. You must call store to persist the newly created or updated selection list and insert it into the referenced folder. (The folder must exist before the selection list can be stored.) For an example of using a selection list in a Data Entry Template, see Creating Publisher Data Entry Templates Using IDK Remote APIs.

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()
...

  Back to Top      Previous Next