Class Menu

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

    public class Menu
    extends StylableTag
    This tag defines a drop-down menu that is is opened when the user moves the mouse over or clicks at the title of the menu.

    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=...
       >
    
    Tag attributes
    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:

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

    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:
    • enter: The menu will open as soon as the mouse enters
    • click: The menu will not open until the mouse is clicked
    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.
    Version:
    2.0
    Author:
    Nicklas
    See Also:
    Serialized Form
    • Field Detail

      • ROOT

        private static String ROOT
        The path to the root directory of this webserver.
      • type

        private String type
        If it is a vertical or horizontal menu.
      • open

        private String open
        If submenus opens as soon as the mouse enters or a click is required.
      • fillText

        private String fillText
        Optional text to display to the far right of a horizontal menu
    • Constructor Detail

      • Menu

        public Menu()