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-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 33c344935 Improved: EBAY- Move from hard-coded menu location to 
parameterized (OFBIZ-13022) (#109)
33c344935 is described below

commit 33c3449350a6ac0ae94fc6e3b29009f0730d2010
Author: Pierre Smits <pierre.sm...@somonar.com>
AuthorDate: Sun Apr 14 12:16:40 2024 +0200

    Improved: EBAY- Move from hard-coded menu location to parameterized 
(OFBIZ-13022) (#109)
    
    Move the product menu location in various eBay screens to parameterized
    
    modified:
    - web.xml: added context-param productMenuLocation
    - CommonScreens.xml:  changed location of ProductTabBar from hard coded to 
parameterized
---
 ebay/webapp/ebay/WEB-INF/web.xml | 5 +++++
 ebay/widget/CommonScreens.xml    | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ebay/webapp/ebay/WEB-INF/web.xml b/ebay/webapp/ebay/WEB-INF/web.xml
index a4ded6b17..2fbcb52c3 100644
--- a/ebay/webapp/ebay/WEB-INF/web.xml
+++ b/ebay/webapp/ebay/WEB-INF/web.xml
@@ -48,6 +48,11 @@ under the License.
         <param-name>mainMenuLocation</param-name>
         <param-value>component://ebay/widget/EbayMenus.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>productMenuLocation</param-name>
+        
<param-value>component://product/widget/catalog/CatalogMenus.xml</param-value>
+    </context-param>
 
     <filter>
         <display-name>ControlFilter</display-name>
diff --git a/ebay/widget/CommonScreens.xml b/ebay/widget/CommonScreens.xml
index 63e8f103f..6d0ddc574 100644
--- a/ebay/widget/CommonScreens.xml
+++ b/ebay/widget/CommonScreens.xml
@@ -63,7 +63,7 @@ under the License.
                                 <section>
                                     <condition><not><if-empty 
field="product"/></not></condition>
                                     <widgets>
-                                        <include-menu name="ProductTabBar" 
location="component://product/widget/catalog/CatalogMenus.xml"/>
+                                        <include-menu name="ProductTabBar" 
location="${parameters.productMenuLocation}"/>
                                         <container>
                                             <label 
style="h1">${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: 
${product.internalName} [${uiLabelMap.CommonId}:${productId}]  
${${extraFunctionName}}</label>
                                             <image 
src="${product.smallImageUrl}" url-mode="content" style="cssImgSmall"/>

Reply via email to