All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.servlet.tbeans.dualselector.html
Class DualListSelector

    com.sas.servlet.tbeans.dualselector.html.DualListSelector

All Implemented Interfaces:
  HttpActionProviderInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, CompositeComponentInterface, DualSelectorKeysInterface, DualSelectorStyleKeysInterface, FormViewInterface, RenderableInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

    public class DualListSelector

The DualListSelector is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript for creating a DualListSelector.

TransformationBean™ definition for creating an HTML/JavaScript DualListSelector. A DualListSelector uses two listboxes which allows to move single or multiple items between the listboxes and submit the selected item(s) that are on the target listbox.

The DualListSelector Transformation Bean gathers the listbox values from a model via the `setModel(javax.swing.ListModel)` and `setTargetModel(javax.swing.ListModel)` methods. A model must implement the `ListModel` interface in order to be used.

The DualListSelector is one of several TransformationBeans™ that are considered composite components. A composite component allows a developer to design custom components that are made up of a combination of other components, such as TextEntry, ListBox, and Label TransformationBeans™. The visual layout of a composite component can be easily controlled through a template. For more information on composite TransformationBeans™, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Composite TransformationBeans™ as well as the TransformationBean™ Component and Style Reference.

The DualListSelector is one of several TransformationBeans™ that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The DualListSelector uses the following JavaScript files:

  sas_duallistselector.js

Note that the toString() method on this class calls the `write` method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:DualListSelector custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
  `BaseDualSelector`, `TreeListSelector`, `DualTreeSelector`, Serialized Form

Field Summary
`static java.lang.String` | `DEFAULT_TEMPLATE_FILE_NAME` Default template file name for the DualListSelector

Fields inherited from class com.sas.servlet.tbeans.dualselector.BaseDualSelector
`imageLocation`

Fields inherited from interface com.sas.servlet.tbeans.dualselector.html.DualSelectorStyleKeysInterface
`DUALSELECTOR_BUTTON, DUALSELECTOR_CONTAINER, DUALSELECTOR_SOURCE_CONTAINER, DUALSELECTOR_SOURCE_LABEL_AREA, DUALSELECTOR_SOURCE_LISTBOX, DUALSELECTOR_TARGET_CONTAINER, DUALSELECTOR_TARGET_LABEL_AREA, DUALSELECTOR_TARGET_LISTBOX`

Fields inherited from interface com.sas.servlet.tbeans.dualselector.DualSelectorKeysInterface
`DUALSELECTOR, DUALSELECTOR_DOWN_BUTTON, DUALSELECTOR_LEFT_ALL_BUTTON, DUALSELECTOR_LEFT_BUTTON, DUALSELECTOR_RIGHT_ALL_BUTTON, DUALSELECTOR_RIGHT_BUTTON, DUALSELECTOR_SOURCE, DUALSELECTOR_SOURCE_LABEL, DUALSELECTOR_SUBMIT_BUTTON, DUALSELECTOR_TARGET, DUALSELECTOR_TARGET_LABEL, DUALSELECTOR_UP_BUTTON`

Constructor Summary
`DualListSelector()` Construct a new DualListSelector
`DualListSelector(java.lang.String name, javax.swing.ListModel model)` Construct a new DualListSelector

Method Summary
`BaseTransformation` | `getDefaultComponent()` Returns the source component used for this selector (com.sas.servlet.tbeans.form.html.ListBox)
`javax.swing.ListModel` | `getModel()` Return the model for the ListBox.
`protected java.lang.String` | `getMoveAllToTarget()` Returns the JavaScript function name for moving all items from the source component to the target.
`protected java.lang.String` | `getMoveItemsDown()` Returns the JavaScript function name for moving item(s) down on the target component.
`protected java.lang.String` | `getMoveItemsUp()` Returns the JavaScript function name for moving item(s) up on the target component.
`protected java.lang.String` | `getMoveToTarget()` Returns the JavaScript function name for moving item(s) from the source component to the target.
`protected java.lang.String` | `getRemoveAllFromTarget()` Returns the JavaScript function name for removing all items from the target component.
`protected java.lang.String` | `getRemoveFromTarget()` Returns the JavaScript function name for removing item(s) from the target component.
`protected java.lang.String` | `getSubmitAction()` Returns the JavaScript function name for submitting the form
`javax.swing.ListModel` | `getTargetModel()` Gets the model to be used for the target listbox.
`void` | `setModel(javax.swing.ListModel listModel)` Sets the model for the ListBox.
`protected void` | `setSelectorDefaults()` Sets default images, and JavaScript events for the components.
`void` | `setTargetModel(javax.swing.ListModel model)` Sets the model to be used for the descriptions of the DualSelector's target listbox entry.
`void` | `write(java.io.PrintWriter out)` Writes the transformed representation of the selector

Methods inherited from class com.sas.servlet.tbeans.dualselector.html.DualSelector
`getAdditionalParameters, getDefaultButton, getDefaultButtonTemplate, getDefaultFormObject, getDefaultLabel, getDefaultMoveButtonTemplate, getDefaultMoveUpDownButtonTemplate, getDefaultSelectorTemplate, getDefaultTemplate, getFormObject, getPostDownTrigger, getPostSourceTrigger, getPostTargetTrigger, getPostUpTrigger, getPreDownTrigger, getPreSourceTrigger, getPreTargetTrigger, getPreUpTrigger, getSourceComponentName, getTargetComponentName, initializeSelector, isFormEnabled, setAdditionalParameter, setAdditionalParameters, setDefaultComponentNames, setFormEnabled, setFormObject, setId, setName, setPostDownTrigger, setPostSourceTrigger, setPostTargetTrigger, setPostUpTrigger, setPreDownTrigger, setPreSourceTrigger, setPreTargetTrigger, setPreUpTrigger`

Methods inherited from class com.sas.servlet.tbeans.dualselector.BaseDualSelector
`getImageLocation, getMultipleSelections, getSize, getSourceLabel, getTargetLabel, getTargetMaximumCount, isStaticSourceAllowed, isSubmitButtonVisible, isTargetButtonsVisible, isTargetDuplicateAllowed, isTransferAllButtonVisible, setImageLocation, setMultipleSelections, setSize, setStaticSourceAllowed, setSubmitButtonVisible, setTargetButtonsVisible, setTargetDuplicateAllowed, setTargetMaximumCount, setTransferAllButtonVisible`

Methods inherited from class com.sas.servlet.tbeans.BaseCompositeTransformation
`applyTemplate, applyTemplate, getActionProvider, getComponent, getComponents, getStyleInfo, getStyleMap, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, getVisibleComponents, isFlushEnabled, propertyChange, removeComponent, setActionProvider, setCleanUpResourcesOn, setComponent, setFlushEnabled, setLocale, setRequest, setResponse, setStyleInfo, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation, writeTemplate`

Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
`addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCustomAttributes, setInputTransform, setLocaleDependentProperties, setObjectData, setObjectDataProperty, setOutputTransform, setTagEpilog, setTagProlog, setVisible, toString, write, write, write`

Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface
`getRequest`

Field Detail

### DEFAULT_TEMPLATE_FILE_NAME

    public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME

  Default template file name for the DualListSelector

  See Also:
    Constant Field Values

Constructor Detail

### DualListSelector

    public DualListSelector()

  Construct a new DualListSelector

### DualListSelector

    public DualListSelector(java.lang.String name,
                            javax.swing.ListModel model)

  Construct a new DualListSelector

  Parameters:
    `name` - The dual selector name
    `model` - The model for the source listbox

Method Detail

### setSelectorDefaults

    protected void setSelectorDefaults()

  Description copied from class: `DualSelector`
  Sets default images, and JavaScript events for the components.

  Overrides:
    `setSelectorDefaults` in class `DualSelector`

### write

    public void write(java.io.PrintWriter out)
               throws java.io.IOException

  Writes the transformed representation of the selector

  Specified by:
    `write` in interface `TransformationInterface`
  Specified by:
    `write` in interface `com.sas.util.WriteToPrintWriterInterface`
  Overrides:
    `write` in class `BaseCompositeTransformation`
  Parameters:
    `out` - The output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### getDefaultComponent

    public BaseTransformation getDefaultComponent()

  Returns the source component used for this selector (com.sas.servlet.tbeans.form.html.ListBox)

  Specified by:
    `getDefaultComponent` in class `BaseDualSelector`
  Returns:
    com.sas.servlet.tbeans.form.html.ListBox
  See Also:
    `ListBox`

### getModel

    public javax.swing.ListModel getModel()

  Return the model for the ListBox.

  Returns:
    the model for the ListBox
  See Also:
    `BaseListBox.setModel(javax.swing.ListModel)`

### setModel

    public void setModel(javax.swing.ListModel listModel)

  Sets the model for the ListBox.

  Parameters:
    `listModel` - the model for the ListBox
  See Also:
    `BaseListBox.getModel()`

### setTargetModel

    public void setTargetModel(javax.swing.ListModel model)

  Sets the model to be used for the descriptions of the DualSelector's target listbox entry.

  Parameters:
    `model` - The model to use for the target listbox
  See Also:
    `getTargetModel()`, `getModel()`

### getTargetModel

    public javax.swing.ListModel getTargetModel()

  Gets the model to be used for the target listbox.

  Returns:
    The model used for the target listbox
  See Also:
    `setTargetModel(ListModel)`, `getModel()`

### getRemoveFromTarget

    protected java.lang.String getRemoveFromTarget()

  Description copied from class: `DualSelector`
  Returns the JavaScript function name for removing item(s) from the target component.

  Specified by:
    `getRemoveFromTarget` in class `DualSelector`
  Returns:
    JavaScript function name

### getRemoveAllFromTarget

    protected java.lang.String getRemoveAllFromTarget()

  Description copied from class: `DualSelector`
  Returns the JavaScript function name for removing all items from the target component.

  Specified by:
    `getRemoveAllFromTarget` in class `DualSelector`
  Returns:
    JavaScript function name

### getMoveToTarget

    protected java.lang.String getMoveToTarget()

  Description copied from class: `DualSelector`
  Returns the JavaScript function name for moving item(s) from the source component to the target.

  Specified by:
    `getMoveToTarget` in class `DualSelector`
  Returns:
    JavaScript function name

### getMoveItemsUp

    protected java.lang.String getMoveItemsUp()

  Description copied from class: `DualSelector`
  Returns the JavaScript function name for moving item(s) up on the target component.

  Specified by:
    `getMoveItemsUp` in class `DualSelector`
  Returns:
    JavaScript function name

### getMoveItemsDown

    protected java.lang.String getMoveItemsDown()

  Description copied from class: `DualSelector`
  Returns the JavaScript function name for moving item(s) down on the target component.

  Specified by:
    `getMoveItemsDown` in class `DualSelector`
  Returns:
    JavaScript function name

### getMoveAllToTarget

    protected java.lang.String getMoveAllToTarget()

  Description copied from class: `DualSelector`
  Returns the JavaScript function name for moving all items from the source component to the target.

  Specified by:
    `getMoveAllToTarget` in class `DualSelector`
  Returns:
    JavaScript function name

### getSubmitAction

    protected java.lang.String getSubmitAction()

  Description copied from class: `DualSelector`
  Returns the JavaScript function name for submitting the form

  Specified by:
    `getSubmitAction` in class `DualSelector`
  Returns:
    JavaScript function name

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.