Class Submenu

All Implemented Interfaces:
Serializable, DynamicAttributes, IterationTag, JspTag, Tag, DynamicActionAttributes

public class Submenu
extends StylableTag
This tag defines a menu item inside a drop-down menu. This tag can only be used inside a Menu tag, which should contain at least one of these tags.

Syntax:

   <m:submenu
      id=...
      clazz=...
      subclass=...
      style=...
      title=...
      subid=...
      tooltip=...
      enabled=...
      visible=...
      icon=...
   >
Tag attributes
Attribute Default value Required Description
id - no The ID of the menuitem. The value of this attribute goes directly into the standard HTML id attribute. This means that if you need a reference to the menuitem object in your own JavaScript code, you may for example use the following code:

menuitem = document.getElementById('<id>');

style - no The value if this attribute goes directly into the standard HTML style attribute. This allows you to apply different styles to different menu items.
title - yes The text that should be displayed in the menu for this menuitem.
subid - yes The ID attribute of another menu that will be shown as a submenu.
tooltip - no An optional tooltip that is shown as a popup text while the user is pointing the mouse over the menuitem. Not supported by all browsers.
enabled 1 no 0 to display a disabled (greyed-out) menu. All other values will enable the menu
visible true no Use false to hide this menu item entirely.
icon - no The filename of an icon to display before the title. The icon must be placed in the /images directory. Do not include any path information in the icon attribute.
Version:
2.0
Author:
Nicklas
See Also:
Serialized Form
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
      Constant Field Values
    • title

      private String title
      The title of the menu item.
    • subId

      private String subId
      The ID of the submenu.
    • tooltip

      private String tooltip
      A tooltip explaining the menu item.
    • enabled

      private boolean enabled
      If the menu item is enabled.
    • visible

      private boolean visible
      If the menu item is visible.
    • icon

      private String icon
      An icon to display.
  • Constructor Details

    • Submenu

      public Submenu()
  • Method Details

    • setTitle

      public void setTitle​(String title)
    • getTitle

      public String getTitle()
    • setSubid

      public void setSubid​(String subId)
    • getSubid

      public String getSubid()
    • setTooltip

      public void setTooltip​(String tooltip)
    • getTooltip

      public String getTooltip()
    • setEnabled

      public void setEnabled​(boolean enabled)
    • isEnabled

      public boolean isEnabled()
    • setVisible

      public void setVisible​(boolean visible)
    • isVisible

      public boolean isVisible()
    • setIcon

      public void setIcon​(String icon)
    • getIcon

      public String getIcon()
    • setDynamic

      public void setDynamic​(Iterator<DynamicActionAttribute> dynamicAttributes)
    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class TagSupport
      Throws:
      JspException