com.sas.servlet.tbeans.menubar.html
Class SelectorMenuItem

com.sas.servlet.tbeans.menubar.html.SelectorMenuItem
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, AlternateTextInterface, ComplexStyleInterface, DisabledImageInterface, com.sas.servlet.tbeans.DisabledImageKeyInterface, EnabledInterface, ImageInterface, com.sas.servlet.tbeans.ImageKeyInterface, ImagePositionInterface, LabelInterface, MenuBarStyleAreaKeysInterface, RenderableInterface, com.sas.servlet.tbeans.ScriptActivatedInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, com.sas.servlet.tbeans.TitleInterface, TransformationInterface, URLInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

public class SelectorMenuItem
implements MenuBarStyleAreaKeysInterface, ComplexStyleInterface

The SelectorMenuItem is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript used to populate a selector menu in a MenuBar.

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

sas_menubar.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:SelectorMenuItem 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:
MenuItem, Serialized Form

Field Summary
 
Fields inherited from class com.sas.servlet.tbeans.menubar.BaseSelectorMenuItem
modal
 
Fields inherited from class com.sas.servlet.tbeans.menubar.BaseMenuItem
submenu
 
Fields inherited from class com.sas.servlet.tbeans.BaseButton
BOTTOM, BOTTOM_ALL, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER_ALL, DEFAULT_DYNAMIC_BUTTON_ROOT_KEY, DEFAULT_DYNAMIC_BUTTON_ROOT_NAME, imageLocation, LEFT, NONE, RIGHT, TOP, TOP_ALL, TOP_LEFT, TOP_RIGHT
 
Fields inherited from interface com.sas.servlet.tbeans.menubar.html.MenuBarStyleAreaKeysInterface
MENU, MENU_DISABLED, MENU_DIVIDER, MENU_ITEM, MENU_ITEM_ARROW, MENU_ITEM_CONTAINER, MENU_ITEM_DISABLED, MENU_ITEM_DIVIDER, MENU_ITEM_LINK, MENU_ITEM_LINK_DISABLED, MENU_LINK, MENU_LINK_DISABLED, MENUBAR_CONTAINER
 
Constructor Summary
SelectorMenuItem()
          Constructor of SelectorMenuItem
SelectorMenuItem(BaseTransformation selector)
          Constructor of SelectorMenuItem
SelectorMenuItem(BaseTransformation selector, javax.servlet.http.HttpServletRequest request)
          Constructor of SelectorMenuItem
SelectorMenuItem(javax.servlet.http.HttpServletRequest request)
          Constructor of SelectorMenuItem
 
Method Summary
 java.util.Map getStyleMap()
          Returns the component style map for this MenuItem.
 java.lang.String getTarget()
          Returns the target set on the menubar.
 void setStyleMap(java.util.Map styleMap)
           
 void write(java.io.PrintWriter out)
          Write the contents of the SelectorMenuItem.
 
Methods inherited from class com.sas.servlet.tbeans.menubar.BaseSelectorMenuItem
getMenuType, getSelector, getSelectorHeight, getSelectorWidth, isModal, setMenuType, setModal, setSelector, setSelectorHeight, setSelectorWidth
 
Methods inherited from class com.sas.servlet.tbeans.menubar.BaseMenuItem
getDefaultTemplate, getMenu, getNextMenu, getNextMenuItem, getPreviousMenu, getPreviousMenuItem, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, isDivider, isSelected, setNextMenu, setNextMenuItem, setPreviousMenu, setPreviousMenuItem, setSelected, setTemplate, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation
 
Methods inherited from class com.sas.servlet.tbeans.BaseButton
getAccessKey, getAlternateText, getBottomImage, getBottomLeftImage, getBottomRightImage, getDisabledAlternateText, getDisabledImage, getDynamicButtonArea, getDynamicRootName, getHeight, getHeightPercentage, getImage, getImageLocation, getImagePosition, getLabel, getLeftImage, getOnBlur, getOnClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseOut, getOnMouseOver, getOnMouseUp, getRightImage, getRolloverImage, getTabIndex, getTitle, getTopImage, getTopLeftImage, getTopRightImage, getURL, getWidth, getWidthPercentage, isActive, isEnabled, isFocused, isVerifyEnabled, isWrapped, setAccessKey, setActive, setAlternateText, setBottomImage, setBottomLeftImage, setBottomRightImage, setDisabledAlternateText, setDisabledImage, setDynamicButtonArea, setDynamicRootName, setEnabled, setFocus, setHeight, setHeightPercentage, setImage, setImage, setImageLocation, setImagePosition, setLabel, setLeftImage, setOnBlur, setOnClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRightImage, setRolloverImage, setTabIndex, setTarget, setTitle, setTopImage, setTopLeftImage, setTopRightImage, setURL, setVerifyEnabled, setWidth, setWidthPercentage, setWrap
 
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, setCleanUpResourcesOn, setCustomAttributes, setDescription, setId, setInputTransform, setLocale, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 

Constructor Detail

SelectorMenuItem

public SelectorMenuItem()
Constructor of SelectorMenuItem


SelectorMenuItem

public SelectorMenuItem(javax.servlet.http.HttpServletRequest request)
Constructor of SelectorMenuItem


SelectorMenuItem

public SelectorMenuItem(BaseTransformation selector)
Constructor of SelectorMenuItem

Parameters:
selector - - the selector object associated with the menu item

SelectorMenuItem

public SelectorMenuItem(BaseTransformation selector,
                        javax.servlet.http.HttpServletRequest request)
Constructor of SelectorMenuItem

Parameters:
selector - - the selector object associated with the menu item
Method Detail

write

public void write(java.io.PrintWriter out)
           throws java.io.IOException
Write the contents of the SelectorMenuItem. This method calls the cleanUpResources method at the end to reset the request and response back to null.

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

getTarget

public java.lang.String getTarget()
Returns the target set on the menubar. The target is used when menuType is SELECTOR_EXTERNAL as the opener window name.

Overrides:
getTarget in class BaseButton
Returns:
target value

getStyleMap

public java.util.Map getStyleMap()
Returns the component style map for this MenuItem.
STYLE KEYDEFAULT STYLE
MENU_ITEM_ARROWmenuItemArrow
MENU_ITEM_DIVIDERmenuItemDivider
MENU_ITEM MenuItem
MENU_ITEM_LINK menuItemLink
MENU_ITEM_DISABLED menuItemDisabled
MENU_ITEM_LINK_DISABLED menuItemLinkDisabled
MENU_ITEM_ARROW menuItemArrow

Specified by:
getStyleMap in interface ComplexStyleInterface
Returns:
styles used for this MenuItem.

setStyleMap

public void setStyleMap(java.util.Map styleMap)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.