Class ModelMenu

java.lang.Object
org.apache.ofbiz.widget.model.ModelWidget
org.apache.ofbiz.widget.model.ModelMenu
All Implemented Interfaces:
Serializable

public class ModelMenu extends ModelWidget
Models the <menu> element. see widget-menu.xsd
See Also:
  • Constructor Details

  • Method Details

    • accept

      public void accept(ModelWidgetVisitor visitor) throws Exception
      Specified by:
      accept in class ModelWidget
      Throws:
      Exception
    • getActions

      public List<ModelAction> getActions()
      Gets actions.
      Returns:
      the actions
    • getBoundaryCommentName

      public String getBoundaryCommentName()
      Description copied from class: ModelWidget
      Returns the widget's name to be used in boundary comments. The default action is to return the widget's name. Derived classes can override this method to return a customized name.
      Overrides:
      getBoundaryCommentName in class ModelWidget
      Returns:
      Name to be used in boundary comments
    • getCurrentMenuName

      public String getCurrentMenuName(Map<String,Object> context)
      Gets current menu name.
      Parameters:
      context - the context
      Returns:
      the current menu name
    • getDefaultAlign

      public String getDefaultAlign()
      Gets default align.
      Returns:
      the default align
    • getDefaultAlignStyle

      public String getDefaultAlignStyle()
      Gets default align style.
      Returns:
      the default align style
    • getDefaultAssociatedContentId

      public FlexibleStringExpander getDefaultAssociatedContentId()
      Gets default associated content id.
      Returns:
      the default associated content id
    • getDefaultAssociatedContentId

      public String getDefaultAssociatedContentId(Map<String,Object> context)
      Gets default associated content id.
      Parameters:
      context - the context
      Returns:
      the default associated content id
    • getDefaultCellWidth

      public String getDefaultCellWidth()
      Gets default cell width.
      Returns:
      the default cell width
    • getDefaultDisabledTitleStyle

      public String getDefaultDisabledTitleStyle()
      Gets default disabled title style.
      Returns:
      the default disabled title style
    • getDefaultEntityName

      public String getDefaultEntityName()
      Gets default entity name.
      Returns:
      the default entity name
    • getDefaultHideIfSelected

      public Boolean getDefaultHideIfSelected()
      Gets default hide if selected.
      Returns:
      the default hide if selected
    • getDefaultMenuItemName

      public String getDefaultMenuItemName()
      Gets default menu item name.
      Returns:
      the default menu item name
    • getDefaultPermissionEntityAction

      public String getDefaultPermissionEntityAction()
      Gets default permission entity action.
      Returns:
      the default permission entity action
    • getDefaultPermissionOperation

      public String getDefaultPermissionOperation()
      Gets default permission operation.
      Returns:
      the default permission operation
    • getDefaultSelectedStyle

      public String getDefaultSelectedStyle()
      Gets default selected style.
      Returns:
      the default selected style
    • getDefaultTitleStyle

      public String getDefaultTitleStyle()
      Gets default title style.
      Returns:
      the default title style
    • getDefaultTooltipStyle

      public String getDefaultTooltipStyle()
      Gets default tooltip style.
      Returns:
      the default tooltip style
    • getDefaultWidgetStyle

      public String getDefaultWidgetStyle()
      Gets default widget style.
      Returns:
      the default widget style
    • getExtraIndex

      public FlexibleStringExpander getExtraIndex()
      Gets extra index.
      Returns:
      the extra index
    • getExtraIndex

      public String getExtraIndex(Map<String,Object> context)
      Gets extra index.
      Parameters:
      context - the context
      Returns:
      the extra index
    • getFillStyle

      public String getFillStyle()
      Gets fill style.
      Returns:
      the fill style
    • getId

      public String getId()
      Gets id.
      Returns:
      the id
    • getMenuContainerStyle

      public String getMenuContainerStyle(Map<String,Object> context)
      Gets menu container style.
      Parameters:
      context - the context
      Returns:
      the menu container style
    • getMenuContainerStyleExdr

      public FlexibleStringExpander getMenuContainerStyleExdr()
      Gets menu container style exdr.
      Returns:
      the menu container style exdr
    • getMenuItemList

      public List<ModelMenuItem> getMenuItemList()
      Gets menu item list.
      Returns:
      the menu item list
    • getMenuItemMap

      public Map<String,ModelMenuItem> getMenuItemMap()
      Gets menu item map.
      Returns:
      the menu item map
    • getMenuLocation

      public String getMenuLocation()
      Gets menu location.
      Returns:
      the menu location
    • getMenuWidth

      public String getMenuWidth()
      Gets menu width.
      Returns:
      the menu width
    • getModelMenuItemByName

      public ModelMenuItem getModelMenuItemByName(String name)
      Gets model menu item by name.
      Parameters:
      name - the name
      Returns:
      the model menu item by name
    • getOrientation

      public String getOrientation()
      Gets orientation.
      Returns:
      the orientation
    • getParentMenu

      public ModelMenu getParentMenu()
      Gets parent menu.
      Returns:
      the parent menu
    • getSelectedMenuItemContextFieldName

      public FlexibleMapAccessor<String> getSelectedMenuItemContextFieldName()
      Gets selected menu item context field name.
      Returns:
      the selected menu item context field name
    • getSelectedMenuItemContextFieldName

      public String getSelectedMenuItemContextFieldName(Map<String,Object> context)
      Gets selected menu item context field name.
      Parameters:
      context - the context
      Returns:
      the selected menu item context field name
    • getTarget

      public String getTarget()
      Gets target.
      Returns:
      the target
    • getTitle

      public FlexibleStringExpander getTitle()
      Gets title.
      Returns:
      the title
    • getTitle

      public String getTitle(Map<String,Object> context)
      Gets title.
      Parameters:
      context - the context
      Returns:
      the title
    • getTooltip

      public String getTooltip()
      Gets tooltip.
      Returns:
      the tooltip
    • getType

      public String getType()
      Gets type.
      Returns:
      the type
    • renderedMenuItemCount

      public int renderedMenuItemCount(Map<String,Object> context)
      Rendered menu item count int.
      Parameters:
      context - the context
      Returns:
      the int
    • renderMenuString

      public void renderMenuString(Appendable writer, Map<String,Object> context, MenuStringRenderer menuStringRenderer) throws IOException
      Renders this menu to a String, i.e. in a text format, as defined with the MenuStringRenderer implementation.
      Parameters:
      writer - The Writer that the menu text will be written to
      context - Map containing the menu context; the following are reserved words in this context: parameters (Map), isError (Boolean), itemIndex (Integer, for lists only, otherwise null), menuName (String, optional alternate name for menu, defaults to the value of the name attribute)
      menuStringRenderer - An implementation of the MenuStringRenderer interface that is responsible for the actual text generation for different menu elements; implementing you own makes it possible to use the same menu definitions for many types of menu UIs
      Throws:
      IOException - the io exception
    • renderSimpleMenuString

      public void renderSimpleMenuString(Appendable writer, Map<String,Object> context, MenuStringRenderer menuStringRenderer) throws IOException
      Render simple menu string.
      Parameters:
      writer - the writer
      context - the context
      menuStringRenderer - the menu string renderer
      Throws:
      IOException - the io exception
    • runActions

      public void runActions(Map<String,Object> context)
      Run actions.
      Parameters:
      context - the context