Package io.jmix.flowui.menu
Class MenuConfig
java.lang.Object
io.jmix.flowui.menu.MenuConfig
Holds information about the main menu structure.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Dom4jToolsprotected org.springframework.core.env.Environmentprotected IconLoaderSupportprotected org.springframework.beans.factory.ObjectProvider<IconLoaderSupport> protected booleanprotected ReadWriteLockstatic final Stringprotected org.springframework.beans.factory.ObjectProvider<MenuConfigCustomizer> protected Messagesprotected MessageToolsprotected Metadataprotected MetadataToolsprotected JmixModulesprotected Resourcesprotected UiPropertiesprotected ViewTemplateDefinitions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckDuplicateAction(@Nullable String menuItemId, String... actionDefinition) protected voidprotected voidcheckValueOrEntityProvided(org.dom4j.Element property) protected ComponentLoader.Contextprotected @Nullable MenuItemcreateMenuItem(org.dom4j.Element element, @Nullable MenuItem currentParentItem) protected MenuItemcreateTemplateMenuItem(MenuItem parentItem, ViewTemplateDefinition definition) protected @Nullable MenuItem@Nullable MenuItemprotected IconLoaderSupportgetItemIdPath(String id, @Nullable MenuItem parentItem) protected voidgetItemIdPathRecursive(String id, @Nullable MenuItem parentItem, LinkedList<String> resultPath) getItemTitle(MenuItem menuItem) Returns the title of the specified menu item.getItemTitle(String id) Returns the title of a menu item based on its identifier.protected ObjectMain menu root itemsprotected voidinit()protected voidloadClassNames(org.dom4j.Element element, MenuItem menuItem) protected voidloadDescription(org.dom4j.Element element, MenuItem menuItem) protected StringloadEntityFetchPlan(org.dom4j.Element propertyElement) protected voidprotected MetaClassloadItemPropertyEntityClass(org.dom4j.Element property) protected ObjectloadItemPropertyEntityId(org.dom4j.Element property, MetaClass metaClass) protected List<MenuItem.MenuItemParameter> loadMenuItemParameters(org.dom4j.Element menuItem, String parametersElementName) protected List<MenuItem.MenuItemProperty> loadMenuItemProperties(org.dom4j.Element menuItem) protected @Nullable ObjectloadMenuItemPropertyValue(org.dom4j.Element property) protected voidloadMenuItems(org.dom4j.Element parentElement, @Nullable MenuItem parentItem, Map<List<String>, MenuItem> menusByIdPaths) protected voidloadOpened(org.dom4j.Element element, MenuItem menuItem) protected StringloadResourceString(@Nullable String ref) protected voidloadShortcutCombination(MenuItem menuItem, org.dom4j.Element element) protected voidprotected voidprotected voidloadVisible(org.dom4j.Element element, MenuItem menuItem) protected @Nullable ObjectparseEntityId(MetaClass entityMetaClass, String entityId) voidreset()Make the config to reload view on next request.
-
Field Details
-
MENU_CONFIG_XML_PROP
- See Also:
-
rootItems
-
resources
-
messages
-
messageTools
-
dom4JTools
-
environment
@Autowired protected org.springframework.core.env.Environment environment -
uiProperties
-
modules
-
metadata
-
metadataTools
-
viewTemplateDefinitions
-
iconLoaderSupportProvider
@Autowired protected org.springframework.beans.factory.ObjectProvider<IconLoaderSupport> iconLoaderSupportProvider -
iconLoaderSupport
-
initialized
protected volatile boolean initialized -
lock
-
-
Constructor Details
-
MenuConfig
public MenuConfig()
-
-
Method Details
-
getItemTitle
Returns the title of a menu item based on its identifier.- Parameters:
id- the unique identifier of the menu item- Returns:
- the title of the menu item
-
checkInitialized
protected void checkInitialized() -
init
protected void init() -
reset
public void reset()Make the config to reload view on next request. -
getRootItems
Main menu root items -
loadTemplateMenuItems
protected void loadTemplateMenuItems() -
findItem
-
checkValueOrEntityProvided
protected void checkValueOrEntityProvided(org.dom4j.Element property) -
checkDuplicateAction
-
loadResourceString
-
loadMenuItemProperties
-
loadMenuItemParameters
protected List<MenuItem.MenuItemParameter> loadMenuItemParameters(org.dom4j.Element menuItem, String parametersElementName) -
loadMenuItemPropertyValue
-
getMenuItemPropertyTypedValue
-
loadItemPropertyEntityClass
-
loadItemPropertyEntityId
-
loadEntityFetchPlan
-
parseEntityId
-
getIconLoaderSupport
-
createLoaderContext
-