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 DualTreeSelector

    com.sas.servlet.tbeans.dualselector.html.DualTreeSelector

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 DualTreeSelector

Transformation bean definition for creating an HTML/JavaScript DualTreeSelector. A DualTreeSelector uses two TreeViews which allows to move items between the TreeViews and submit the selected items that are on the right side (Target) TreeView

The DualTreeSelector Transformation Bean gathers the Tree values from a model via the `setModel(javax.swing.tree.TreeModel)` and `setTargetModel(javax.swing.tree.TreeModel)` methods.

The DualTreeSelector 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 DualTreeSelector 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 DualTreeSelector uses the following JavaScript files:

  sas_DualTreeSelector.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.

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`, `DualListSelector`, `TreeView`, Serialized Form

Field Summary
`static java.lang.String` | `DEFAULT_TEMPLATE_FILE_NAME` The default template file name for the template that provides the layout for this panel.

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
`DualTreeSelector()` Construct a new DualTreeSelector
`DualTreeSelector(java.lang.String name, javax.swing.tree.TreeModel model)` Construct a new DualTreeSelector

Method Summary
`BaseTransformation` | `getDefaultComponent()` Returns the source component used for this selector (com.sas.servlet.tbeans.html.TreeView)
`javax.swing.tree.TreeModel` | `getModel()` Return the model for the Tree.
`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.tree.TreeModel` | `getTargetModel()` Return the model for the Tree.
`java.lang.String` | `getTargetNode()` Returns the name of the target node the selected nodes are moved to.
`protected void` | `setDefaultComponentNames()` Sets default names for the components that are in this DualSelector.
`void` | `setModel(javax.swing.tree.TreeModel treeModel)` Sets the model for the Tree.
`protected void` | `setSelectorDefaults()` Sets default images, and JavaScript events for the components.
`void` | `setTargetModel(javax.swing.tree.TreeModel treeModel)` Sets the model for the Tree.
`void` | `setTargetNode(java.lang.String targetNode)` Sets the name of a node that is in the target tree model.
`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, 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

  The default template file name for the template that provides the layout for this panel.

  See Also:
    Constant Field Values

Constructor Detail

### DualTreeSelector

    public DualTreeSelector()

  Construct a new DualTreeSelector

### DualTreeSelector

    public DualTreeSelector(java.lang.String name,
                            javax.swing.tree.TreeModel model)

  Construct a new DualTreeSelector

  Parameters:
    `name` - The field name
    `model` - The model for the source tree

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

### getModel

    public javax.swing.tree.TreeModel getModel()

  Return the model for the Tree.

  Returns:
    the model for the Tree
  See Also:
    `setModel(TreeModel)`

### setModel

    public void setModel(javax.swing.tree.TreeModel treeModel)

  Sets the model for the Tree.

  Parameters:
    `treeModel` - the model for the Tree
  See Also:
    `getModel()`

### getTargetModel

    public javax.swing.tree.TreeModel getTargetModel()

  Return the model for the Tree.

  Returns:
    the model for the Tree
  See Also:
    `setModel(TreeModel)`

### setTargetModel

    public void setTargetModel(javax.swing.tree.TreeModel treeModel)

  Sets the model for the Tree.

  Parameters:
    `treeModel` - the model for the Tree
  See Also:
    `getModel()`

### 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

### 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

### 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

### 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

### 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

### getDefaultComponent

    public BaseTransformation getDefaultComponent()

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

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

### getTargetNode

    public java.lang.String getTargetNode()

  Returns the name of the target node the selected nodes are moved to.

  Returns:
    the name of the target node

### setTargetNode

    public void setTargetNode(java.lang.String targetNode)

  Sets the name of a node that is in the target tree model. When a node is moved from the available tree, the selected node will be moved under this node. If null and the selected node's parent is not already on the target tree, the parent along with the selected node will be moved to the selected tree.

  Parameters:
    `targetNode` - name of a targetNode

### setDefaultComponentNames

    protected void setDefaultComponentNames()

  Description copied from class: `DualSelector`
  Sets default names for the components that are in this DualSelector.

  Overrides:
    `setDefaultComponentNames` in class `DualSelector`

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.