This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new 24d42f3be2 Improved: CommonExt - Move from hard-code menu location to parameterized (OFBIZ-12951) (#795) 24d42f3be2 is described below commit 24d42f3be2913b33543c77ae8323dc5a98d9cbe7 Author: Pierre Smits <pierre.sm...@somonar.com> AuthorDate: Sun May 19 09:21:51 2024 +0200 Improved: CommonExt - Move from hard-code menu location to parameterized (OFBIZ-12951) (#795) * Improved: CommonExt - Move from hard-code menu location to parameterized (OFBIZ-12951) ofbizsetup uses profile screens from partymgr. modified web.xml - added profileMenuLocation * OFBIZ-12951 Fix dependency on party ofbizsetup is dependent on party elements modified: commonext - web.xml: added new context-param for createNewParty menu modified: party - web.xml: added new context-param for createNewParty menu - PartyScreens.xml: changed location createNewParty menu reference * Improved: CommonExt - Move from hard-code menu location to parameterized (OFBIZ-12951) modified: Menus.xml - added MainActionMenu extending MainActionMenu in PartyMenus.xml --- applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml | 10 ++++++++++ applications/commonext/widget/ofbizsetup/Menus.xml | 3 +++ applications/party/webapp/partymgr/WEB-INF/web.xml | 5 +++++ applications/party/widget/partymgr/PartyScreens.xml | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml b/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml index bb9c92eaa0..1273a95064 100644 --- a/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml +++ b/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml @@ -43,6 +43,16 @@ <param-name>mainMenuLocation</param-name> <param-value>component://commonext/widget/ofbizsetup/Menus.xml</param-value> </context-param> + <context-param> + <description>The location of the profile screen menus file to be used in this webapp; referred to as a context variable in screen def XML files.</description> + <param-name>profileMenuLocation</param-name> + <param-value>component://party/widget/partymgr/PartyMenus.xml</param-value> + </context-param> + <context-param> + <description>The location of the 'new party' menus file to be used in this webapp; referred to as a context variable in screen def XML files.</description> + <param-name>newPartyMenuLocation</param-name> + <param-value>component://party/widget/partymgr/PartyMenus.xml</param-value> + </context-param> <filter> <display-name>ControlFilter</display-name> diff --git a/applications/commonext/widget/ofbizsetup/Menus.xml b/applications/commonext/widget/ofbizsetup/Menus.xml index 12e5df1991..49ac9ce94e 100644 --- a/applications/commonext/widget/ofbizsetup/Menus.xml +++ b/applications/commonext/widget/ofbizsetup/Menus.xml @@ -20,6 +20,9 @@ <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ofbiz.apache.org/Widget-Menu" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Menu http://ofbiz.apache.org/dtds/widget-menu.xsd"> + <menu name="MainActionMenu" menu-container-style="button-bar button-style-2" default-selected-style="selected" + extends="MainActionMenu" extends-resource="component://party/widget/partymgr/PartyMenus.xml"> + </menu> <menu name="SetupAppBar" title="${uiLabelMap.SetupApp}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="main" title="${uiLabelMap.SetupInitialSetup}"> <link target="initialsetup"/> diff --git a/applications/party/webapp/partymgr/WEB-INF/web.xml b/applications/party/webapp/partymgr/WEB-INF/web.xml index 2e67dfe4ca..2dc363d4c6 100644 --- a/applications/party/webapp/partymgr/WEB-INF/web.xml +++ b/applications/party/webapp/partymgr/WEB-INF/web.xml @@ -53,6 +53,11 @@ under the License. <param-name>profileMenuLocation</param-name> <param-value>component://party/widget/partymgr/PartyMenus.xml</param-value> </context-param> + <context-param> + <description>The location of the 'new party' menus file to be used in this webapp; referred to as a context variable in screen def XML files.</description> + <param-name>newPartyMenuLocation</param-name> + <param-value>component://party/widget/partymgr/PartyMenus.xml</param-value> + </context-param> <filter> <display-name>ControlFilter</display-name> diff --git a/applications/party/widget/partymgr/PartyScreens.xml b/applications/party/widget/partymgr/PartyScreens.xml index ffeca925b2..8546efc621 100644 --- a/applications/party/widget/partymgr/PartyScreens.xml +++ b/applications/party/widget/partymgr/PartyScreens.xml @@ -54,7 +54,7 @@ under the License. <widgets> <screenlet id="FindPartyPanel" title="${uiLabelMap.PartyFindParty}" navigation-menu-name="CreateNewParty" navigation-form-name="LookupParty" save-collapsed="false" collapsible="true" initially-collapsed="${initialyCollapsed}"> - <include-menu name="CreateNewParty" location="${parameters.mainMenuLocation}"/> + <include-menu name="CreateNewParty" location="${parameters.newPartyMenuLocation}"/> <include-form name="LookupParty" location="component://party/widget/partymgr/PartyForms.xml"/> </screenlet> <screenlet title="${uiLabelMap.CommonSearchResults}" navigation-form-name="ListParty">