com.cc.framework.taglib.menu
Class MenuTag

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

public class MenuTag
extends BaseControlTag
implements MenuContainerTag

Tag handler for the menu tag.

A menu definition is triggered with this tag. The actual menu options are specified with <menu:menuitem>-tags in the tag-body.

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

Field Summary
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class com.cc.framework.taglib.controls.BaseControlTag
log
 
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
MenuTag()
          Constructor
 
Method Summary
 void addMenuItem(MenuItem item)
          Adds a menu item
protected  Control doCreateControl()
          Creates the control element
protected  ControlDesignModel doCreateDesignModel()
          This method is called to create the DesignModel for the control
protected  MenuDesignModel getMenuDesignModel()
          Returns a casted version of the ControlDesignModel
 void setId(java.lang.String id)
           
 void setImagemap(java.lang.String mapName)
          Specifies the name of an Imagemap which must be saved in the request.
 void setMenuid(java.lang.String id)
          Defines the internally used identifier of the menu option.
 void setStyle(java.lang.String style)
          An HTML-style.
 void setStyleClass(java.lang.String styleClass)
          The HTML-class attribute.
 void setStyleId(java.lang.String styleId)
          The HTML-id attribute.
 void setType(java.lang.String type)
          Specifies the menu type and hence the visual appearance of the menu.
 
Methods inherited from class com.cc.framework.taglib.controls.BaseControlTag
addDesignRule, beginPaint, createControl, createPainter, doEndTag, doStartTag, endPaint, getClientHandler, getControl, getDefaultAction, getDesignModel, getDirectValue, getHttpScope, getPainterContext, lookupBean, release, releaseDesignModel, setAction, setAjax, setAjax, setBorder, setDirectValue, setDisabled, setFormElement, setHeight, setHelp, setLocale, setName, setPageContext, setPermission, setProperty, setRunat, setScope, setShadow, setSummary, setTabindex, setTooltip, setTransaction, setValue, setWidth
 
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
Constructor Detail

MenuTag

public MenuTag()
Constructor

Method Detail

doCreateDesignModel

protected ControlDesignModel doCreateDesignModel()
Description copied from class: BaseControlTag
This method is called to create the DesignModel for the control

Specified by:
doCreateDesignModel in class BaseControlTag
Returns:
A concrete DesignModel
See Also:
BaseControlTag.doCreateDesignModel()

getMenuDesignModel

protected MenuDesignModel getMenuDesignModel()
Returns a casted version of the ControlDesignModel

Returns:
MenuDesignModel

doCreateControl

protected Control doCreateControl()
                           throws javax.servlet.jsp.JspException
Description copied from class: BaseControlTag
Creates the control element

Specified by:
doCreateControl in class BaseControlTag
Returns:
control element
Throws:
javax.servlet.jsp.JspException - If an error during bean lookup occurs
See Also:
BaseControlTag.doCreateControl()

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(com.cc.framework.ui.model.MenuItem)

setId

public void setId(java.lang.String id)
Overrides:
setId in class BaseControlTag
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

setType

public void setType(java.lang.String type)
             throws javax.servlet.jsp.JspException
Specifies the menu type and hence the visual appearance of the menu.

Parameters:
type - The type of the menu
Throws:
javax.servlet.jsp.JspException - If the argument can't be converted to an object of type MenuType

setImagemap

public void setImagemap(java.lang.String mapName)
                 throws javax.servlet.jsp.JspException
Specifies the name of an Imagemap which must be saved in the request. The value of the imageref property of the menu entries are mapped to the entries in this Imagemap. The mapping is done with the help of the regular expression, which is assigned to every entry of the Imagemap. The Painter appends to the imageref-value implicit, the following suffixes in order to distinguish between different states: The selected menu option is always determined through the current menu context which can be set in the JSP-Page with <menu:ctx> or in the application with MenuContext.setPath(java.lang.String) . Note: Under the name, there must be an Imagemap saved in the request.

Parameters:
mapName - Imagemap
Throws:
javax.servlet.jsp.JspException - When the Image Map could not be found

setStyle

public void setStyle(java.lang.String style)
An HTML-style. See HTML documentation for the attribute style.

Overrides:
setStyle in class BaseControlTag
Parameters:
style - An HTML-style

setStyleId

public void setStyleId(java.lang.String styleId)
The HTML-id attribute. See HTML documentation for the Attribute id.

Overrides:
setStyleId in class BaseControlTag
Parameters:
styleId - The HTML-id attribute

setStyleClass

public void setStyleClass(java.lang.String styleClass)
The HTML-class attribute. See HTML documentation for the attribute class.

Overrides:
setStyleClass in class BaseControlTag
Parameters:
styleClass - The HTML-class attribute


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