com.cc.framework.taglib.menu
Class MenuItemTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.cc.framework.taglib.ScriptTagSupport
          extended bycom.cc.framework.taglib.menu.MenuItemTag
All Implemented Interfaces:
InnerTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, MenuContainerTag, ScriptSupport, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class MenuItemTag
extends ScriptTagSupport
implements MenuContainerTag, InnerTag

Tag-Handler for the menuitem Tag.

A menu definition is declared with this tag. A menu entry can itself in turn contain additional <menu:menuitem>-tags. The tag can only be used within <menu:menu> and <menu:menuitem>-tags.

Since:
1.0
Version:
$Revision: 1.27 $
Author:
Gernot Schulz
See Also:
Serialized Form

Field Summary
private  MenuItem designModel
          DesignModel
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
MenuItemTag()
          Constructor
 
Method Summary
 void addMenuItem(MenuItem item)
          Adds a menu item
 int doEndTag()
           
 int doStartTag()
           
 ClientHandler getClientHandler()
          Returns the ClientHandler interface of the controls design model.
protected  MenuItem getDesignModel()
          Returns the MenuItemDesignModel
 void release()
           
protected  void releaseDesignModel()
          Releases the design model model
 void setAction(java.lang.String action)
          Specifies the Struts Action that is to be called upon selection of a menu option
 void setFilter(java.lang.String filter)
          Defines the optional filter condition(s) for this menu option.
 void setId(java.lang.String id)
           
 void setImageref(java.lang.String imageRef)
          The Painter appends to the imageref-value implicit, the following suffixes in order to distinguish between different states.
 void setLocale(java.lang.String locale)
          Sets the locale configuration for this element
 void setMenuid(java.lang.String id)
          Defines the internally used identifier of the menu option.
 void setOrientation(java.lang.String orientation)
          Specifies the orientation of possible sub menu items: horizontal = from top to bottom vertical = from left to right
 void setPageContext(javax.servlet.jsp.PageContext pc)
           
 void setPermission(java.lang.String permission)
          With this attribute, access to the element can be restricted.
 void setShortcut(java.lang.String shortcut)
          A keyboard shortcut for the menu entry
 void setState(java.lang.String state)
          Specifies the state of the menu option.
 void setTarget(java.lang.String target)
          The HTML-target attribute of the element can be specified with this attribute.
 void setText(java.lang.String text)
          The actual label of the menu option.
 void setTooltip(java.lang.String tooltip)
          A short descriptive text that is displayed when the user moves the mouse over the element.
 void setWidth(java.lang.String tag)
          Sets the width of the control element.
 
Methods inherited from class com.cc.framework.taglib.ScriptTagSupport
setOnabort, setOnactivate, setOnafterprint, setOnafterupdate, setOnbeforeactivate, setOnbeforecopy, setOnbeforecut, setOnbeforedeactivate, setOnbeforeeditfocus, setOnbeforepaste, setOnbeforeprint, setOnbeforeunload, setOnbeforeupdate, setOnblur, setOnbounce, setOncellchange, setOnchange, setOncheck, setOncheckall, setOnclick, setOncollapse, setOncontextmenu, setOncontrolselect, setOncopy, setOncut, setOndataavailable, setOndatasetchanged, setOndatasetcomplete, setOndblclick, setOndeactivate, setOndrag, setOndragend, setOndragenter, setOndragleave, setOndragover, setOndragstart, setOndrop, setOnerror, setOnerrorupdate, setOnexpand, setOnexpandex, setOnfilterchange, setOnfinish, setOnfocus, setOnfocusin, setOnfocusout, setOnhelp, setOnkeydown, setOnkeypress, setOnkeyup, setOnlayoutcomplete, setOnload, setOnlosecapture, setOnmousedown, setOnmouseenter, setOnmouseleave, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnmove, setOnmoveend, setOnmovestart, setOnpaste, setOnpropertychange, setOnreadystatechange, setOnreset, setOnresize, setOnresizeend, setOnresizestart, setOnrowenter, setOnrowexit, setOnrowsdelete, setOnrowsinserted, setOnscroll, setOnselect, setOnselectionchange, setOnselectstart, setOnspindown, setOnspinup, setOnstart, setOnstop, setOnsubmit, setOnuncheck, setOnuncheckall, setOnunload
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

designModel

private MenuItem designModel
DesignModel

Constructor Detail

MenuItemTag

public MenuItemTag()
Constructor

Method Detail

getDesignModel

protected MenuItem getDesignModel()
Returns the MenuItemDesignModel

Returns:
MenuItemDesignModel

releaseDesignModel

protected void releaseDesignModel()
Releases the design model model


setPageContext

public void setPageContext(javax.servlet.jsp.PageContext pc)
Specified by:
setPageContext in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.setPageContext(PageContext pc)

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.release()

getClientHandler

public ClientHandler getClientHandler()
Description copied from interface: ScriptSupport
Returns the ClientHandler interface of the controls design model.

Specified by:
getClientHandler in interface ScriptSupport
Returns:
ClientHandler
See Also:
ScriptSupport.getClientHandler()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doEndTag()

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doStartTag()

setId

public void setId(java.lang.String id)
See Also:
TagSupport.setId(java.lang.String)

setMenuid

public void setMenuid(java.lang.String id)
Defines the internally used identifier of the menu option. A menu path is formed by concatenating the menu id's across the declaration hierarchy. A menu option can be considered to be selected when the current menu context path starts with the menu path! Note: Individual path elements are delimited with "/".

Parameters:
id - An identifier of the menu option

setAction

public void setAction(java.lang.String action)
Specifies the Struts Action that is to be called upon selection of a menu option

Parameters:
action - The action

setState

public void setState(java.lang.String state)
Specifies the state of the menu option.

Parameters:
state - The menu state

setText

public void setText(java.lang.String text)
The actual label of the menu option. This must also be specified if an image is to be used for the menu option.

Parameters:
text - The text of the menu option.

setTooltip

public void setTooltip(java.lang.String tooltip)
A short descriptive text that is displayed when the user moves the mouse over the element.

Parameters:
tooltip - Tooltip

setShortcut

public void setShortcut(java.lang.String shortcut)
A keyboard shortcut for the menu entry

Parameters:
shortcut - Shortcut

setWidth

public void setWidth(java.lang.String tag)
Sets the width of the control element. The height may be specified in absolute or percent terms.

Parameters:
tag - String

setTarget

public void setTarget(java.lang.String target)
The HTML-target attribute of the element can be specified with this attribute. Note: See HTML documentation for the attribute target.

Parameters:
target - Target-Attribute

setFilter

public void setFilter(java.lang.String filter)
Defines the optional filter condition(s) for this menu option. The menu context filter must tailing with at least one filter so that the menu option is displayed. Note: Several filters are delimited with ";".

Parameters:
filter - An optional filter condition(s)

setLocale

public void setLocale(java.lang.String locale)
Sets the locale configuration for this element

Parameters:
locale - Locale Identifier or true|false

setImageref

public void setImageref(java.lang.String imageRef)
The Painter appends to the imageref-value implicit, the following suffixes in order to distinguish between different states. ThePainter appends to the imageref-value implicit, the following suffixes in order to distinguish between different states:

Parameters:
imageRef - The reference to an image declared an imagemap

setPermission

public void setPermission(java.lang.String permission)
                   throws javax.servlet.jsp.JspException
With this attribute, access to the element can be restricted. Authorizations are always specified in the form of an Access Control List (ACL). What is involved here is a semicolon-delimited list with individual authorizations.

Parameters:
permission - List of permissions
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to an Object of type Permission

addMenuItem

public void addMenuItem(MenuItem item)
Description copied from interface: MenuContainerTag
Adds a menu item

Specified by:
addMenuItem in interface MenuContainerTag
Parameters:
item - The menu item to add
See Also:
MenuContainerTag.addMenuItem(MenuItem)

setOrientation

public void setOrientation(java.lang.String orientation)
                    throws javax.servlet.jsp.JspException
Specifies the orientation of possible sub menu items:

Parameters:
orientation - The orientation of the sub menu items
Throws:
javax.servlet.jsp.JspException - If the argument can't be converted to an OrientationType


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.