com.sas.servlet.tbeans.form
Class BaseComboBoxView

com.sas.servlet.tbeans.form.BaseComboBoxView
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, FormElementModificationEventInterface, com.sas.servlet.tbeans.form.JavaScriptObjectCreationInterface, com.sas.servlet.tbeans.JavaScriptEventHandlerInterface, RenderableInterface, TransformationInterface, GenericValidatorInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable
Direct Known Subclasses:
ComboBoxView

public abstract class BaseComboBoxView

The BaseComboBoxView is an abstract TransformationBean™ for creating a ComboBoxView. A ComboBoxView is a drop-down combo that allows a single selection when editable is set to false (default).

When editable is set to true, then the combo box includes a text field into which the user can type a value.

The non-editable ComboBoxView can contain text only, images only, or both text and images together. An editable ComboBoxView can only contain text

The ChoiceBox TransformationBean™ gathers the selections from a model via the setModel method. A model must implement the javax.swing.ComboBoxModel interface in order to be used. The model can only contain JavaScriptNode items.

Note that subclasses of this bean actually provide the markup rendering used in/with Servlet and JavaServer Pages technologies. If you need to add support for a markup language that is not explicitly provided with AppDev Studio, then you must extend this class.

For More Information:

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 .

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sas.servlet.tbeans.form.BaseChoiceBox
labelTransform, model, RB_KEY
 
Constructor Summary
BaseComboBoxView()
          Construct a new ComboBoxView object
 
Method Summary
 java.lang.String getImageLocation()
          Gets the image location for the images in the ComboBoxView.
 int getMaximumRowCount()
          Gets the maximum number of rows the ComboBoxView will display.
 boolean isEditable()
          Returns true if the ComboBoxView is editable.
 boolean isImagesOnly()
          Determines if images only should be displayed.
 boolean isRenderUsingIFrame()
          The value which determines if the ComboBoxView is written as an IFRAME, or normally.
 void setEditable(boolean value)
          Determines whether the ComboBoxView field is editable.
 void setImageLocation(java.lang.String value)
          Sets the image location for the images in the ComboBoxView.
 void setImagesOnly(boolean value)
          Sets whether or not to display images only.
 void setMaximumRowCount(int value)
          Sets the maximum number of rows the ComboBoxView displays.
 void setRenderUsingIFrame(boolean value)
          Determines if the ComboBoxView is written out as an IFRAME.
 
Methods inherited from class com.sas.servlet.tbeans.form.BaseChoiceBox
getModel, getSelectedIndex, getSelectedItem, getValueItemLabel, isSelected, isSelected, isValidateSelection, setModel, setSelectedIndex, setSelectedItem, setSelectedItem, setValidateSelection
 
Methods inherited from class com.sas.servlet.tbeans.form.BaseFormElement
getAccessKey, getErrorHandler, getModificationEventName, getName, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyleInfo, getTabIndex, getTitle, getValidationFunctions, getValidator, isEnabled, isValid, isValidationEnabled, setAccessKey, setEnabled, setErrorHandler, setId, setModificationEventName, setName, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyleInfo, setTabIndex, setTitle, setValidator, write, writeJavaScriptObject, writeJavaScriptObjectValidate, writeJavaScriptValidatorObject, writeValidationScript
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setInputTransform, setLocale, setLocaleDependentProperties, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 

Constructor Detail

BaseComboBoxView

public BaseComboBoxView()
Construct a new ComboBoxView object

Method Detail

setEditable

public void setEditable(boolean value)
Determines whether the ComboBoxView field is editable. An editable ComboBoxView allows the user to type into the field or select an item from the list to initialize the field, after which it can be edited. (The editing affects only the field, the list items remain intact.) A non editable ComboBoxView displays the selected item in the field, but the selection cannot be modified.

Parameters:
value - true indicates that the field is editable

isEditable

public boolean isEditable()
Returns true if the ComboBoxView is editable. By default, a ComboBoxView is not editable.

Returns:
true if the ComboBoxView field is editable

setMaximumRowCount

public void setMaximumRowCount(int value)
Sets the maximum number of rows the ComboBoxView displays. If the number of objects in the model is greater than the maximum row count, the ComboBoxView uses a scrollbar. Value must be greater than 1. By default, the ComboBoxView will display a scrollbar when items in the model exceed 11.

Parameters:
value - The maximumRowCount for the ComboBoxView

getMaximumRowCount

public int getMaximumRowCount()
Gets the maximum number of rows the ComboBoxView will display.

Returns:
The maximum number of rows the ComboBoxView displays.

setImageLocation

public void setImageLocation(java.lang.String value)
Sets the image location for the images in the ComboBoxView.

Parameters:
value - The image location

getImageLocation

public java.lang.String getImageLocation()
Gets the image location for the images in the ComboBoxView.

Returns:
The image location

setImagesOnly

public void setImagesOnly(boolean value)
Sets whether or not to display images only. By default if you only set image and value on a node, the display text is set to value. By setting this method to TRUE, the display text will NOT be set to value. FALSE by default.

Parameters:
value - TRUE to display images only.

isImagesOnly

public boolean isImagesOnly()
Determines if images only should be displayed.

Returns:
TRUE if images only are displayed.

setRenderUsingIFrame

public void setRenderUsingIFrame(boolean value)
Determines if the ComboBoxView is written out as an IFRAME. The default value is FALSE. This only applies if ComboBoxView is editable.

Parameters:
value - TRUE to render ComboBoxView using an IFrame.

isRenderUsingIFrame

public boolean isRenderUsingIFrame()
The value which determines if the ComboBoxView is written as an IFRAME, or normally. For additional information, see #setRenderState(int)

Returns:
boolean that determines if ComboBoxView is to render NORMAL or as an IFRAME.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.