Skip to content

Commit

Permalink
Improved: CommonExt - Move from hard-code menu location to parameteri…
Browse files Browse the repository at this point in the history
…zed (OFBIZ-12951) (#734)

Move the menu location in various commonext screens from hard-coded to parameterized.

modified re ofbizsetup:
- web.xml - added context-param for mainMenuLocation
- CommonScreens.xml
- SetupScreens.xml
  • Loading branch information
PierreSmits authored Mar 19, 2024
1 parent f5c85d4 commit a9fc12b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
<param-name>mainDecoratorLocation</param-name>
<param-value>component://commonext/widget/ofbizsetup/CommonScreens.xml</param-value>
</context-param>
<context-param>
<description>The location of the menus file to be used in this webapp; referred to as a context variable in screen def XML files.</description>
<param-name>mainMenuLocation</param-name>
<param-value>component://commonext/widget/ofbizsetup/Menus.xml</param-value>
</context-param>

<filter>
<display-name>ControlFilter</display-name>
Expand Down
4 changes: 2 additions & 2 deletions applications/commonext/widget/ofbizsetup/CommonScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->
<set field="activeApp" value="ofbizsetup" global="true"/>
<set field="applicationMenuName" value="SetupAppBar" global="true"/>
<set field="applicationMenuLocation" value="component://commonext/widget/ofbizsetup/Menus.xml" global="true"/>
<set field="applicationMenuLocation" value="${parameters.mainMenuLocation}" global="true"/>
<set field="applicationTitle" from-field="uiLabelMap.SetupApp" global="true"/>
<set field="helpAnchor" from-field="helpAnchor" default-value="_the_ofbiz_setup_application_overview"/>
</actions>
Expand Down Expand Up @@ -78,7 +78,7 @@
</and>
</condition>
<widgets>
<include-menu name="SetupSubTabBar" location="component://commonext/widget/ofbizsetup/Menus.xml"/>
<include-menu name="SetupSubTabBar" location="${parameters.mainMenuLocation}"/>
</widgets>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion applications/commonext/widget/ofbizsetup/SetupScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
</or>
</condition>
<widgets>
<include-menu name="FirstProductTabBar" location="component://commonext/widget/ofbizsetup/Menus.xml"/>
<include-menu name="FirstProductTabBar" location="${parameters.mainMenuLocation}"/>
</widgets>
</section>
<decorator-section-include name="body"/>
Expand Down

0 comments on commit a9fc12b

Please sign in to comment.