com.sas.taglib.servlet.tbeans.menubar
Class MenuTag

com.sas.taglib.servlet.tbeans.menubar.MenuTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class MenuTag

MenuTag is the tag handler class for the sas:Menu custom tag MenuTag is invoked by the JSP page to evaluate the sas:Menu custom tag during the execution of the page. Tag handler methods are called by the JSP page implementation class at various points during the evaluation of the tag. The tag handler methods in turn call methods on the underlying Transformation Bean object, Menu, to execute the methods.

If you need to extend or modify the functionality of the sas:Menu custom tag, you can subclass this tag handler class.

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

Refer to the Custom Tag Library Reference for usage information on the sas:Menu 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:
BaseMenu, Serialized Form

Field Summary
static java.lang.String RB_KEY
           
 
Fields inherited from class com.sas.taglib.BaseBodyTag
DELIMITERS
 
Constructor Summary
MenuTag()
           
 
Method Summary
protected  void applyAttributes()
          Sets the attributes on the underlying Menu object.
 int doEndTag()
          Process the end tag.
 int doStartTag()
          Processes the start tag for this instance.
 java.lang.String getAccessKey()
          Gets the accesskey.
 java.lang.String getAlternateText()
          Gets the alternateText property (String) Returns the ALT attribute on the HTML output tag that provides tooltip text when hovering over the image.
 java.lang.String getDisabledImage()
          Returns the disabledImage
 java.lang.String getDividerImage()
          Gets the dividerImage property (String) Returns the dividerImage used for menu items on this menu
 boolean getEnabled()
          Gets the enabled property (boolean)
 java.lang.String getImage()
          Gets the image property (String)
 java.lang.String getImageLocation()
          Gets the imageLocation property (String) Returns the imageLocation used to construct the menu.
 java.lang.String getImagePosition()
          Gets the imagePosition property (String) The position of the image.
 java.lang.String getLabel()
          Gets the label property (String)
 java.lang.String getStyleClassPrefix()
          Gets the styleClassPrefix property (String) The prefix to append to the ids of the items in the control.
 java.lang.String getSubMenuImage()
          Gets the subMenuImage property (String) Returns the subMenuImage used as a sub-menu item indicator.
 int getTabIndex()
          Gets the tabindex.
 java.lang.String getTarget()
          getTarget returns the value of the TARGET= argument used on the anchor tags generated.
 java.lang.String getTitle()
          Gets the title of the href.
 java.lang.String getURL()
          Gets the URL property (String) The URL to associate with the label or image.
protected  void initialize(boolean includeAttributes)
          Initializes attributes and variables for this tag handler.
 boolean isWrapped()
          Gets the wrap property (boolean) A value of true indicates the label is wrapped.
 void setAccessKey(java.lang.String value)
          Sets the accesskey.
 void setAlternateText(java.lang.String alternateText)
          Sets the alternateText property (String) Sets the ALT attribute on the HTML output tag that provides tooltip text when hovering over the image.
 void setDisabledImage(java.lang.String disabledImage)
          Sets the disabled image that will be displayed when the menu is disabled
 void setDividerImage(java.lang.String dividerImage)
          Sets the dividerImage property (String).
 void setEnabled(boolean enabled)
          Sets the enabled property (boolean).
 void setImage(java.lang.String image)
          Sets the image property (String).
 void setImageLocation(java.lang.String imageLocation)
          Sets the imageLocation property (String).
 void setImagePosition(java.lang.String imagePosition)
          Sets the imagePosition property (String) The position of the image.
 void setLabel(java.lang.String label)
          Sets the label property (String) The label to display on the menu.
 void setStyleClassPrefix(java.lang.String styleClassPrefix)
          Sets the styleClassPrefix property (String).
 void setSubMenuImage(java.lang.String subMenuImage)
          Sets the subMenuImage property (String).
 void setTabIndex(int value)
          Sets the tabindex.
 void setTarget(java.lang.String value)
          Sets the value of the TARGET= argument used on the anchor tags generated.
 void setTitle(java.lang.String value)
          Sets the title for the href.
 void setURL(java.lang.String URL)
          Sets the URL property (String).
 void setWrap(boolean wrap)
          Sets the wrap property (boolean).
 
Methods inherited from class com.sas.taglib.servlet.tbeans.BaseTransformationBodyTag
getCustomAttributes, getEpilog, getLocale, getName, getObjectDataProperty, getProlog, getRender, getRenderType, setCustomAttributes, setEpilog, setLocale, setName, setObjectDataProperty, setProlog, setRender, setRenderType
 
Methods inherited from class com.sas.taglib.BaseBodyTag
doCatch, doFinally, getApplyAttributes, getBodyStrings, getCompositeComponentKey, getInstantiate, getPageContext, getRef, getScope, getTagScope, getWrappedClassName, getWrappedObject, getWrappedObject, loadBeanInstance, newInstance, release, removeFromScope, searchContext, setApplyAttributes, setCompositeComponentKey, setInstantiate, setRef, setScope, setTagScope, setVariableWithinScope, setWrappedClassName, setWrappedObject, validate
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values
Constructor Detail

MenuTag

public MenuTag()
Method Detail

initialize

protected void initialize(boolean includeAttributes)
Initializes attributes and variables for this tag handler.

Overrides:
initialize in class BaseTransformationBodyTag
Parameters:
includeAttributes - Set to true if attributes are to be set to default values.

setDividerImage

public void setDividerImage(java.lang.String dividerImage)
Sets the dividerImage property (String).

Parameters:
dividerImage - the dividerImage used for the menu items on this menu.

getDividerImage

public java.lang.String getDividerImage()
Gets the dividerImage property (String) Returns the dividerImage used for menu items on this menu

Returns:
The divider image used for the menu items on this menu

setSubMenuImage

public void setSubMenuImage(java.lang.String subMenuImage)
Sets the subMenuImage property (String).

Parameters:
subMenuImage - the subMenuImage used as a sub-menu item indicator for this menu

getSubMenuImage

public java.lang.String getSubMenuImage()
Gets the subMenuImage property (String) Returns the subMenuImage used as a sub-menu item indicator.

Returns:
The image indicator of the menu item with submenus

setImageLocation

public void setImageLocation(java.lang.String imageLocation)
Sets the imageLocation property (String).

Parameters:
imageLocation - the image location

getImageLocation

public java.lang.String getImageLocation()
Gets the imageLocation property (String) Returns the imageLocation used to construct the menu.

Returns:
The image location for this menu

setAlternateText

public void setAlternateText(java.lang.String alternateText)
Sets the alternateText property (String) Sets the ALT attribute on the HTML output tag that provides tooltip text when hovering over the image.

Parameters:
alternateText - The text that provides tooltip when hovering over the image.

getAlternateText

public java.lang.String getAlternateText()
Gets the alternateText property (String) Returns the ALT attribute on the HTML output tag that provides tooltip text when hovering over the image.

Returns:
The alternate text of the image

setLabel

public void setLabel(java.lang.String label)
Sets the label property (String) The label to display on the menu. This is required if image is not specified.

Parameters:
label - the label String

getLabel

public java.lang.String getLabel()
Gets the label property (String)

Returns:
label the label String

setImagePosition

public void setImagePosition(java.lang.String imagePosition)
Sets the imagePosition property (String) The position of the image. Valid values are "Right" - If both image and label is specified for the menu, the image will be placed on the right hand side of the menu. "Left" - If both image and label is specified for the menu, the image will be placed on the left hand side of the menu.

Parameters:
imagePosition - the imagePosition String

getImagePosition

public java.lang.String getImagePosition()
Gets the imagePosition property (String) The position of the image. Valid values are "Right" - If both image and label is specified for the menu, the image will be placed on the right hand side of the menu. "Left" - If both image and label is specified for the menu, the image will be placed on the left hand side of the menu.

Returns:
the imagePosition String

setURL

public void setURL(java.lang.String URL)
Sets the URL property (String). The URL to associate with the label or image.

Parameters:
URL - the URL String

getURL

public java.lang.String getURL()
Gets the URL property (String) The URL to associate with the label or image.

Returns:
the URL String

setImage

public void setImage(java.lang.String image)
Sets the image property (String). The image to display in the menu. This is required if label is not specified.

Parameters:
image - the image String

getImage

public java.lang.String getImage()
Gets the image property (String)

Returns:
the image String

setDisabledImage

public void setDisabledImage(java.lang.String disabledImage)
Sets the disabled image that will be displayed when the menu is disabled

Parameters:
image - image displayed when the menu item is disabled

getDisabledImage

public java.lang.String getDisabledImage()
Returns the disabledImage

Returns:
image displayed on the menu when the menu is disabled

setStyleClassPrefix

public void setStyleClassPrefix(java.lang.String styleClassPrefix)
Sets the styleClassPrefix property (String). The prefix to append to the ids of the items in the control.

Parameters:
styleClassPrefix - the styleClassPrefix String

getStyleClassPrefix

public java.lang.String getStyleClassPrefix()
Gets the styleClassPrefix property (String) The prefix to append to the ids of the items in the control.

Returns:
the styleClassPrefix String

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled property (boolean). A value of true indicates the menu is enabled.

Parameters:
enabled - the enabled String

getEnabled

public boolean getEnabled()
Gets the enabled property (boolean)

Returns:
the enabled String

setTarget

public void setTarget(java.lang.String value)
Sets the value of the TARGET= argument used on the anchor tags generated.

Parameters:
value - The value of the TARGET= argument on the anchor tag

getTarget

public java.lang.String getTarget()
getTarget returns the value of the TARGET= argument used on the anchor tags generated. This value determines where/how the links associated with the menu/menu items.

Returns:
TARGET= argument of the anchor tags

setWrap

public void setWrap(boolean wrap)
Sets the wrap property (boolean). A value of true indicates the label is wrapped.

Parameters:
wrap - boolean value of the wrap property

isWrapped

public boolean isWrapped()
Gets the wrap property (boolean) A value of true indicates the label is wrapped.

Returns:
the wrap value

setTabIndex

public void setTabIndex(int value)
Sets the tabindex.

Parameters:
tabindex - The FormElement tabindex

getTabIndex

public int getTabIndex()
Gets the tabindex.

Returns:
tabindex The tabindex

setAccessKey

public void setAccessKey(java.lang.String value)
Sets the accesskey.

Parameters:
accesskey - The accesskey

getAccessKey

public java.lang.String getAccessKey()
Gets the accesskey.

Returns:
accesskey The accesskey

setTitle

public void setTitle(java.lang.String value)
Sets the title for the href.

Parameters:
value - The title of the href

getTitle

public java.lang.String getTitle()
Gets the title of the href.

Returns:
accesskey The title

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Processes the start tag for this instance. The doStartTag() method assumes that all setter methods have been invoked before. When this method is invoked, the body has not yet been invoked.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class BaseTransformationBodyTag
Returns:
int designating the next course of action for the tag/jsp page.
Throws:
javax.servlet.jsp.JspException - Thrown if a JspException occurs.
See Also:
BaseBodyTag.setInstantiate(boolean), TagSupport.doStartTag()

applyAttributes

protected void applyAttributes()
                        throws javax.servlet.jsp.JspException
Sets the attributes on the underlying Menu object.

Overrides:
applyAttributes in class BaseTransformationBodyTag
Throws:
javax.servlet.jsp.JspException - Thrown if a JspException occurs.

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end tag. This method will be called on all Tag objects.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class BaseTransformationBodyTag
Returns:
int designating the next course of action for the tag/jsp page.
Throws:
javax.servlet.jsp.JspException - Thrown if a JspException occurs.
See Also:
TagSupport.doEndTag(), BaseBodyTag.setInstantiate(boolean)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.