public class Menu extends StylableTag
This tag can only be used inside a Body
tag and you should have at
least one of these tags. Use Menuitem
and/or Menuseparator
tags inside this tag to define the contents of the drop-down menu.
Syntax:
<m:menu id=... type=... clazz=... subclass=... style=... open=... filltext=... >
Attribute | Default value | Required | Description |
id | - | yes | The ID of the menu. The value of this attribute
goes directly into the standard HTML id attribute.
This means that if you need a reference to the menu object in your own
JavaScript code, you may for example use the following code:
|
type | vertical | no |
If the menu should be displayed vertically or horizontally. The
allowed values are horizontal and vertical
|
clazz | menu_vertical | no |
The value if this attribute goes directly into the standard HTML
class attribute. This allows you to apply different styles
to different menus. If you set the type attribute to horizontal you
should also change this attribute to menu_horizontal .
|
style | - | no |
The value if this attribute goes directly into the standard HTML
style attribute. This allows you to apply different styles
to different menus. Note! If you want the menu to be hidden to begin with
you can use: style="display: none;" .
|
open | enter | no | A value indicating if it requires a mouse click or not to
open a menu. Valid values are:
|
filltext | - | no | A short text that will be displayed to the far right of the menu if it is a horizontal menu. This value is ignored for vertical menus. |
Modifier and Type | Field and Description |
---|---|
private String |
fillText
Optional text to display to the far right of a horizontal menu
|
private String |
open
If submenus opens as soon as the mouse enters or a click is required.
|
private static String |
ROOT
The path to the root directory of this webserver.
|
private String |
type
If it is a vertical or horizontal menu.
|
id, pageContext
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
Menu() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addMenuitem(String html) |
int |
doEndTag() |
int |
doStartTag() |
String |
getFilltext() |
String |
getOpen() |
(package private) String |
getRoot() |
String |
getType() |
(package private) boolean |
isVertical() |
void |
setFilltext(String fillText) |
void |
setOpen(String open) |
void |
setType(String type) |
addDynamicAttributes, addIdAndStyles, getClazz, getDynamicActionAttributes, getDynamicAttribute, getFullClass, getIdPrefix, getStyle, getSubclass, setClazz, setDynamicAttribute, setMoreDynamicAttributes, setPageContext, setStyle, setSubclass
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue
private static String ROOT
private String type
private String open
private String fillText
public void setType(String type)
public String getType()
public void setOpen(String open)
public String getOpen()
public void setFilltext(String fillText)
public String getFilltext()
boolean isVertical()
String getRoot()
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class TagSupport
JspException