|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.dualselector.html.DualListSelector
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:
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 .
BaseDualSelector
,
TreeListSelector
,
DualTreeSelector
,
Serialized FormField 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.BaseDualSelector |
---|
getImageLocation, getMultipleSelections, getSize, getSourceLabel, getTargetLabel, getTargetMaximumCount, isStaticSourceAllowed, isSubmitButtonVisible, isTargetButtonsVisible, isTargetDuplicateAllowed, isTransferAllButtonVisible, setImageLocation, setMultipleSelections, setSize, setStaticSourceAllowed, setSubmitButtonVisible, setTargetButtonsVisible, setTargetDuplicateAllowed, setTargetMaximumCount, setTransferAllButtonVisible |
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface |
---|
getRequest |
Field Detail |
---|
public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME
Constructor Detail |
---|
public DualListSelector()
public DualListSelector(java.lang.String name, javax.swing.ListModel model)
name
- The dual selector namemodel
- The model for the source listboxMethod Detail |
---|
protected void setSelectorDefaults()
DualSelector
setSelectorDefaults
in class DualSelector
public void write(java.io.PrintWriter out) throws java.io.IOException
write
in interface TransformationInterface
write
in interface com.sas.util.WriteToPrintWriterInterface
write
in class BaseCompositeTransformation
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic BaseTransformation getDefaultComponent()
getDefaultComponent
in class BaseDualSelector
ListBox
public javax.swing.ListModel getModel()
BaseListBox.setModel(javax.swing.ListModel)
public void setModel(javax.swing.ListModel listModel)
listModel
- the model for the ListBoxBaseListBox.getModel()
public void setTargetModel(javax.swing.ListModel model)
model
- The model to use for the target listboxgetTargetModel()
,
getModel()
public javax.swing.ListModel getTargetModel()
setTargetModel(ListModel)
,
getModel()
protected java.lang.String getRemoveFromTarget()
DualSelector
getRemoveFromTarget
in class DualSelector
protected java.lang.String getRemoveAllFromTarget()
DualSelector
getRemoveAllFromTarget
in class DualSelector
protected java.lang.String getMoveToTarget()
DualSelector
getMoveToTarget
in class DualSelector
protected java.lang.String getMoveItemsUp()
DualSelector
getMoveItemsUp
in class DualSelector
protected java.lang.String getMoveItemsDown()
DualSelector
getMoveItemsDown
in class DualSelector
protected java.lang.String getMoveAllToTarget()
DualSelector
getMoveAllToTarget
in class DualSelector
protected java.lang.String getSubmitAction()
DualSelector
getSubmitAction
in class DualSelector
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |