java.lang.Object
com.googlecode.wicket.jquery.ui.widget.menu.AbstractMenuItem
com.googlecode.wicket.jquery.ui.widget.menu.MenuItem
All Implemented Interfaces:
IMenuItem, Serializable, org.apache.wicket.util.io.IClusterable

public class MenuItem extends AbstractMenuItem
Provides a standard menu-item that supports sub-menus
Since:
1.4.2, 6.2.2
Author:
Sebastien Briquet - sebfz1
See Also:
  • Constructor Details

    • MenuItem

      public MenuItem(String title)
      Constructor
      Parameters:
      title - the title of the menu-item
    • MenuItem

      public MenuItem(String title, String icon)
      Constructor
      Parameters:
      title - the title of the menu-item
      icon - the icon css class (ie: ui-my-icon)
    • MenuItem

      public MenuItem(org.apache.wicket.model.IModel<String> title)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
    • MenuItem

      public MenuItem(org.apache.wicket.model.IModel<String> title, String icon)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
      icon - the icon css class (ie: ui-my-icon)
    • MenuItem

      public MenuItem(String title, List<IMenuItem> items)
      Constructor
      Parameters:
      title - the title of the menu-item
      items - the sub-menu items
    • MenuItem

      public MenuItem(String title, String icon, List<IMenuItem> items)
      Constructor
      Parameters:
      title - the title of the menu-item
      icon - the icon css class (ie: ui-my-icon)
      items - the sub-menu items
    • MenuItem

      public MenuItem(org.apache.wicket.model.IModel<String> title, List<IMenuItem> items)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
      items - the sub-menu items
    • MenuItem

      public MenuItem(org.apache.wicket.model.IModel<String> title, String icon, List<IMenuItem> items)
      Constructor
      Parameters:
      title - IModel that represent the title of the menu-item
      icon - the icon css class (ie: ui-my-icon)
      items - the sub-menu items
  • Method Details

    • getItems

      public List<IMenuItem> getItems()
      Description copied from interface: IMenuItem
      Gets the List of submenu-items
      Specified by:
      getItems in interface IMenuItem
      Overrides:
      getItems in class AbstractMenuItem
      Returns:
      the List of submenu-items
    • addItem

      public boolean addItem(IMenuItem item)
      Adds a menu-item as child of this menu-item
      Parameters:
      item - the IMenuItem
      Returns:
      true (as specified by Collection.add(Object))
    • onClick

      public void onClick(org.apache.wicket.ajax.AjaxRequestTarget target)
      Description copied from interface: IMenuItem
      Triggered when the menu-item is clicked
      Parameters:
      target - the AjaxRequestTarget