|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.form.html.ComboBoxView
public class ComboBoxView
The ComboBoxView is a TransformationBean that generates the appropriate HTML 4.0 and JavaScript for creating an element representing a ComboBoxView. The ComboBoxView is a menu that allows a single selection from a drop-down list of items. The drop-down list can contain text only, images only, or both text and images together.
The ComboBoxView TransformationBean gathers the alternatives from a
model via the setModel method. A model must implement the
javax.swing.ComboBoxModel interface in order to be used. The items contained
in the model should of type JavaScriptNode
.
In order for the ComboBoxView Transformation Bean to work properly, sasComponents.css must be included in your .jsp file. This file contains the styles necessary for the ComboBoxView to display properly.
The Section 508 Accessibility standards, such as making application tasks available through the keyboard, are incorporated into our components to improve usability for all of our software products which benefits every SAS user.
This component is fully compliant with the Web-based standards outlined in Section 508. The compliance is based on producing the correct output, having keyboard equivalent and surfacing the necessary properties to assist consumers of the component to be compliant.
The following keyboard equivalents are supported by this component:
KeyBoard Access | Behavior/Result |
---|---|
TAB | TAB moves the focus to the ComboBoxView. Hitting TAB while the ComboBoxView has focus will navigate focus to the next tabable component. |
ALT+ACCESSKEY | Pressing ALT+ACCESSKEY will navigate focus to the ComboBoxView. The ACCESSKEY indicates the keyboard character used as a shortcut to activate the element. |
ALT+UP/DOWN | Pressing ALT+UP arrow or ALT+DOWN arrow while the ComboBoxView has focus, opens the drop-down list box. With it open, the user can move through the entries in the list by using either arrow keys or character keys. As the user navigates through the list, the text field portion of the ComboBoxView is updated with the current selection. Pressing ENTER, TAB, ESC, or using the mouse to click outside of the control, selects the current item and closes the drop-down list box. |
ENTER | Pressing the ENTER key while the ComboBoxView has focus will collapse and expand drop-down list of items. |
UP/DOWN ARROW | Pressing UP arrow or DOWN arrow while the ComboBoxView has focus will move through the entries in the drop-down list without opening the list box. The text field portion of the ComboBoxView is updated with the next/previous entry in the list. |
The following properties are provided to assist in making the application using this component accessible:
The ComboBoxView is one of several TransformationBeans that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans as well as the TransformationBeans Style Sheet Reference.
The ComboBoxView 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 ComboBoxView 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:ComboBoxView 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 .
Field Summary | |
---|---|
static java.lang.String |
PARENT_RB_KEY
|
static java.lang.String |
RB_KEY
Key used to lookup resources in the resource bundle. |
Fields inherited from class com.sas.servlet.tbeans.form.BaseChoiceBox |
---|
labelTransform, model |
Constructor Summary | |
---|---|
ComboBoxView()
Construct a new ComboBoxView |
|
ComboBoxView(java.lang.String name,
javax.swing.ComboBoxModel model)
Construct a new ComboBoxView with a specified name and model. |
Method Summary | |
---|---|
protected void |
addJSProp(java.lang.StringBuffer props,
java.lang.String prefix,
java.lang.String propName,
java.lang.String propValue)
|
java.lang.String |
createNodeParameterString(java.util.Map params)
Returns a String containing the name/value pairs of the properties to be passed to the JavaScript node constructor. |
java.lang.String |
getListBoxViewComponentId()
Gets the id of the ListBoxView component that will be used to as the dropdown portion of the ComboBoxView. |
java.util.Map |
getNodeConstructorParameters()
Returns a Map containing the name/value pairs of the properties to be passed to the constructor. |
java.util.Map |
getStyleMap()
Returns the style map for this ComoboBoxView. |
void |
write(java.io.PrintWriter out)
Writes the transformed representation of the object |
Methods inherited from class com.sas.servlet.tbeans.form.BaseComboBoxView |
---|
getImageLocation, getMaximumRowCount, isEditable, isImagesOnly, isRenderUsingIFrame, setEditable, setImageLocation, setImagesOnly, setMaximumRowCount, setRenderUsingIFrame |
Methods inherited from class com.sas.servlet.tbeans.form.BaseChoiceBox |
---|
getModel, getSelectedIndex, getSelectedItem, getValueItemLabel, isSelected, isSelected, isValidateSelection, setModel, setSelectedIndex, setSelectedItem, setSelectedItem, setValidateSelection |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final java.lang.String PARENT_RB_KEY
Constructor Detail |
---|
public ComboBoxView()
public ComboBoxView(java.lang.String name, javax.swing.ComboBoxModel model)
name
- The field namemodel
- The model for the comboboxview alternativesMethod Detail |
---|
public java.util.Map getStyleMap()
STYLE KEY | DEFAULT STYLE |
COMBOBOXVIEW_EDIT_TEXTCTRL | comboBoxViewTextCtrl |
COMBOBOXVIEW_EDIT_DIV | comboBoxViewDropDown |
COMBOBOXVIEW_EDIT_TABLE | comboBoxViewTable |
COMBOBOXVIEW_EDIT_OPTION | comboBoxViewOption |
COMBOBOXVIEW_EDIT_TEXT_CELL | comboBoxViewTextCell |
COMBOBOXVIEW_EDIT_IMAGE_CELL | comboBoxViewImageCell |
COMBOBOXVIEW_EDIT_BUTTON | comboBoxViewEditButton |
COMBOBOXVIEW_ARROW_CELL | comboBoxViewArrowCell |
COMBOBOXVIEW_IMAGES | comboBoxViewImages |
COMBOBOXVIEW_LIST | comboBoxViewList |
COMBOBOXVIEW_LABEL_DIV | comboBoxViewLabel |
COMBOBOXVIEW_LIST_DIV | comboBoxViewDropDown |
COMBOBOXVIEW_NO_IMAGES | comboBoxViewNoImages |
COMBOBOXVIEW_LIST_TEXT | comboBoxViewListText |
COMBOBOXVIEW_LIST_TABLE | comboBoxViewListTable |
COMBOBOXVIEW_LIST_SELECTED | comboBoxViewListSelected |
COMBOBOXVIEW_LIST_UNHIGHLIGHT | comboBoxViewListUnHighlight |
COMBOBOXVIEW_LIST_HIGHLIGHT | comboBoxViewListHighlight |
COMBOBOXVIEW_ARROW_CELL | comboBoxViewArrowCell |
COMBOBOXVIEW_BUTTON | comboBoxViewButton |
COMBOBOXVIEW_TABLE | comboBoxViewDisplayTable |
COMBOBOXVIEW_TABLE_CELL_LEFT | comboBoxViewLeftTableCell |
COMBOBOXVIEW_TABLE_CELL_LEFT_XP | comboBoxViewLeftTableCellXP |
COMBOBOXVIEW_TABLE_XP | comboBoxViewDisplayTableXP |
COMBOBOXVIEW_LABEL_DIV_XP | comboBoxViewLabelXP |
COMBOBOXVIEW_ARROW_CELL_XP | comboBoxViewArrowCellXP |
COMBOBOXVIEW_BUTTON_XP | comboBoxViewButtonXP |
COMBOBOXVIEW_BUTTON_DIV1 | comboBoxViewButtonDiv1 |
COMBOBOXVIEW_BUTTON_DIV2 | comboBoxViewButtonDiv2 |
COMBOBOXVIEW_BUTTON_DIV3 | comboBoxViewButtonDiv3 |
getStyleMap
in interface ComplexStyleInterface
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 BaseFormElement
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic java.util.Map getNodeConstructorParameters()
public java.lang.String createNodeParameterString(java.util.Map params)
The
- map of node constructor parameters
public java.lang.String getListBoxViewComponentId()
protected void addJSProp(java.lang.StringBuffer props, java.lang.String prefix, java.lang.String propName, java.lang.String propValue)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |