Package org.apache.ofbiz.widget.model
Class ModelMenu
- java.lang.Object
-
- org.apache.ofbiz.widget.model.ModelWidget
-
- org.apache.ofbiz.widget.model.ModelMenu
-
- All Implemented Interfaces:
java.io.Serializable
public class ModelMenu extends ModelWidget
Models the <menu> element.- See Also:
widget-menu.xsd
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Fields inherited from class org.apache.ofbiz.widget.model.ModelWidget
enableBoundaryCommentsParam
-
-
Constructor Summary
Constructors Constructor Description ModelMenu(org.w3c.dom.Element menuElement, java.lang.String menuLocation, VisualTheme visualTheme)
XML Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ModelWidgetVisitor visitor)
java.util.List<ModelAction>
getActions()
java.lang.String
getBoundaryCommentName()
Returns the widget's name to be used in boundary comments.java.lang.String
getCurrentMenuName(java.util.Map<java.lang.String,java.lang.Object> context)
java.lang.String
getDefaultAlign()
java.lang.String
getDefaultAlignStyle()
FlexibleStringExpander
getDefaultAssociatedContentId()
java.lang.String
getDefaultAssociatedContentId(java.util.Map<java.lang.String,java.lang.Object> context)
java.lang.String
getDefaultCellWidth()
java.lang.String
getDefaultDisabledTitleStyle()
java.lang.String
getDefaultEntityName()
java.lang.Boolean
getDefaultHideIfSelected()
java.lang.String
getDefaultMenuItemName()
java.lang.String
getDefaultPermissionEntityAction()
java.lang.String
getDefaultPermissionOperation()
java.lang.String
getDefaultSelectedStyle()
java.lang.String
getDefaultTitleStyle()
java.lang.String
getDefaultTooltipStyle()
java.lang.String
getDefaultWidgetStyle()
FlexibleStringExpander
getExtraIndex()
java.lang.String
getExtraIndex(java.util.Map<java.lang.String,java.lang.Object> context)
java.lang.String
getFillStyle()
java.lang.String
getId()
java.lang.String
getMenuContainerStyle(java.util.Map<java.lang.String,java.lang.Object> context)
FlexibleStringExpander
getMenuContainerStyleExdr()
java.util.List<ModelMenuItem>
getMenuItemList()
java.util.Map<java.lang.String,ModelMenuItem>
getMenuItemMap()
java.lang.String
getMenuLocation()
java.lang.String
getMenuWidth()
ModelMenuItem
getModelMenuItemByName(java.lang.String name)
java.lang.String
getOrientation()
ModelMenu
getParentMenu()
FlexibleMapAccessor<java.lang.String>
getSelectedMenuItemContextFieldName()
java.lang.String
getSelectedMenuItemContextFieldName(java.util.Map<java.lang.String,java.lang.Object> context)
java.lang.String
getTarget()
FlexibleStringExpander
getTitle()
java.lang.String
getTitle(java.util.Map<java.lang.String,java.lang.Object> context)
java.lang.String
getTooltip()
java.lang.String
getType()
int
renderedMenuItemCount(java.util.Map<java.lang.String,java.lang.Object> context)
void
renderMenuString(java.lang.Appendable writer, java.util.Map<java.lang.String,java.lang.Object> context, MenuStringRenderer menuStringRenderer)
Renders this menu to a String, i.e.void
renderSimpleMenuString(java.lang.Appendable writer, java.util.Map<java.lang.String,java.lang.Object> context, MenuStringRenderer menuStringRenderer)
void
runActions(java.util.Map<java.lang.String,java.lang.Object> context)
-
Methods inherited from class org.apache.ofbiz.widget.model.ModelWidget
getName, getStartColumn, getStartLine, getSystemId, toString, widgetBoundaryCommentsEnabled
-
-
-
-
Constructor Detail
-
ModelMenu
public ModelMenu(org.w3c.dom.Element menuElement, java.lang.String menuLocation, VisualTheme visualTheme)
XML Constructor
-
-
Method Detail
-
accept
public void accept(ModelWidgetVisitor visitor) throws java.lang.Exception
- Specified by:
accept
in classModelWidget
- Throws:
java.lang.Exception
-
getActions
public java.util.List<ModelAction> getActions()
-
getBoundaryCommentName
public java.lang.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 classModelWidget
- Returns:
- Name to be used in boundary comments
-
getCurrentMenuName
public java.lang.String getCurrentMenuName(java.util.Map<java.lang.String,java.lang.Object> context)
-
getDefaultAlign
public java.lang.String getDefaultAlign()
-
getDefaultAlignStyle
public java.lang.String getDefaultAlignStyle()
-
getDefaultAssociatedContentId
public FlexibleStringExpander getDefaultAssociatedContentId()
-
getDefaultAssociatedContentId
public java.lang.String getDefaultAssociatedContentId(java.util.Map<java.lang.String,java.lang.Object> context)
-
getDefaultCellWidth
public java.lang.String getDefaultCellWidth()
-
getDefaultDisabledTitleStyle
public java.lang.String getDefaultDisabledTitleStyle()
-
getDefaultEntityName
public java.lang.String getDefaultEntityName()
-
getDefaultHideIfSelected
public java.lang.Boolean getDefaultHideIfSelected()
-
getDefaultMenuItemName
public java.lang.String getDefaultMenuItemName()
-
getDefaultPermissionEntityAction
public java.lang.String getDefaultPermissionEntityAction()
-
getDefaultPermissionOperation
public java.lang.String getDefaultPermissionOperation()
-
getDefaultSelectedStyle
public java.lang.String getDefaultSelectedStyle()
-
getDefaultTitleStyle
public java.lang.String getDefaultTitleStyle()
-
getDefaultTooltipStyle
public java.lang.String getDefaultTooltipStyle()
-
getDefaultWidgetStyle
public java.lang.String getDefaultWidgetStyle()
-
getExtraIndex
public FlexibleStringExpander getExtraIndex()
-
getExtraIndex
public java.lang.String getExtraIndex(java.util.Map<java.lang.String,java.lang.Object> context)
-
getFillStyle
public java.lang.String getFillStyle()
-
getId
public java.lang.String getId()
-
getMenuContainerStyle
public java.lang.String getMenuContainerStyle(java.util.Map<java.lang.String,java.lang.Object> context)
-
getMenuContainerStyleExdr
public FlexibleStringExpander getMenuContainerStyleExdr()
-
getMenuItemList
public java.util.List<ModelMenuItem> getMenuItemList()
-
getMenuItemMap
public java.util.Map<java.lang.String,ModelMenuItem> getMenuItemMap()
-
getMenuLocation
public java.lang.String getMenuLocation()
-
getMenuWidth
public java.lang.String getMenuWidth()
-
getModelMenuItemByName
public ModelMenuItem getModelMenuItemByName(java.lang.String name)
-
getOrientation
public java.lang.String getOrientation()
-
getParentMenu
public ModelMenu getParentMenu()
-
getSelectedMenuItemContextFieldName
public FlexibleMapAccessor<java.lang.String> getSelectedMenuItemContextFieldName()
-
getSelectedMenuItemContextFieldName
public java.lang.String getSelectedMenuItemContextFieldName(java.util.Map<java.lang.String,java.lang.Object> context)
-
getTarget
public java.lang.String getTarget()
-
getTitle
public FlexibleStringExpander getTitle()
-
getTitle
public java.lang.String getTitle(java.util.Map<java.lang.String,java.lang.Object> context)
-
getTooltip
public java.lang.String getTooltip()
-
getType
public java.lang.String getType()
-
renderedMenuItemCount
public int renderedMenuItemCount(java.util.Map<java.lang.String,java.lang.Object> context)
-
renderMenuString
public void renderMenuString(java.lang.Appendable writer, java.util.Map<java.lang.String,java.lang.Object> context, MenuStringRenderer menuStringRenderer) throws java.io.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 tocontext
- 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:
java.io.IOException
-
renderSimpleMenuString
public void renderSimpleMenuString(java.lang.Appendable writer, java.util.Map<java.lang.String,java.lang.Object> context, MenuStringRenderer menuStringRenderer) throws java.io.IOException
- Throws:
java.io.IOException
-
runActions
public void runActions(java.util.Map<java.lang.String,java.lang.Object> context)
-
-