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

com.sas.taglib.servlet.tbeans.menubar.MenuItemTag
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 MenuItemTag

MenuItemTag is the tag handler class for the sas:MenuItem custom tag MenuItemTag is invoked by the JSP page to evaluate the sas:MenuItem 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, MenuItem, to execute the methods.

If you need to extend or modify the functionality of the sas:MenuItem 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:MenuItem 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.

MenuItemTag is used to populate the MenuItems in a MenuTag custom tags.

See Also:
BaseMenuItem, Serialized Form

Field Summary
static java.lang.String RB_KEY
           
 
Fields inherited from class com.sas.taglib.BaseBodyTag
DELIMITERS
 
Constructor Summary
MenuItemTag()
           
 
Method Summary
protected  void applyAttributes()
          Sets the attributes on the underlying MenuItem 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 getImage()
          Gets the image property (String) The image is the icon that is displayed on the menu item.
 java.lang.String getImageLocation()
          Gets the imageLocation property (String) Returns the imageLocation used to construct the menuItem.
 java.lang.String getImagePosition()
          Gets the imagePosition property (String) The position of the image.
 java.lang.String getLabel()
          Gets the label property (String) The label is the text string that is displayed on the menu item.
 MenuItem getMenuItem()
          Gets the corresponding Menu item bean for this custom tag
 java.lang.String getStyleClassPrefix()
          Gets the styleClassPrefix property (String) The prefix to append to the ids of the items in the control.
 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 is the location to show in the browser when the user clicks on this menu item.
protected  void initialize(boolean includeAttributes)
          Initializes attributes and variables for this tag handler.
 boolean isEnabled()
          Gets the enabled property (boolean) A value of true indicates the menu item is enabled.
 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 item is disabled
 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 is the text string that is displayed on the menu item.
 void setStyleClassPrefix(java.lang.String styleClassPrefix)
          Sets the styleClassPrefix 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

MenuItemTag

public MenuItemTag()
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.

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

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

Returns:
The image location for this menuItem

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 item, the image will be placed on the right hand side of the menu. "Left" - If both image and label is specified for the menu item, the image will be placed on the left hand side of the menu item.

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

setLabel

public void setLabel(java.lang.String label)
Sets the label property (String) The label is the text string that is displayed on the menu item. This is required if image is not set.

Parameters:
label - the label String

getLabel

public java.lang.String getLabel()
Gets the label property (String) The label is the text string that is displayed on the menu item. This is required if image is not set.

Returns:
the label String

setImage

public void setImage(java.lang.String image)
Sets the image property (String). The image is the icon that is displayed on the menu item. This is required if label is not set.

Parameters:
image - the image String

getImage

public java.lang.String getImage()
Gets the image property (String) The image is the icon that is displayed on the menu item.

Returns:
the image String

setDisabledImage

public void setDisabledImage(java.lang.String disabledImage)
Sets the disabled image that will be displayed when the menu item 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 item when the menu item is disabled

setURL

public void setURL(java.lang.String URL)
Sets the URL property (String). The URL is the location to show in the browser when the user clicks on this menu item. If menu is specified last, URL is ignored.

Parameters:
URL - the URL String

getURL

public java.lang.String getURL()
Gets the URL property (String) The URL is the location to show in the browser when the user clicks on this menu item. If menu is specified last, URL is ignored.

Returns:
the URL String

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

getMenuItem

public MenuItem getMenuItem()
Gets the corresponding Menu item bean for this custom tag

Returns:
the Menu item

setEnabled

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

Parameters:
enabled - the enabled String

isEnabled

public boolean isEnabled()
Gets the enabled property (boolean) A value of true indicates the menu item is enabled.

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= argrument 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 MenuItem 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.