This is an automated email from the ASF dual-hosted git repository.

mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release24.09 by this push:
     new a82dafbdb1 Load the actions of a menu item
a82dafbdb1 is described below

commit a82dafbdb18a7c0ff0667531ba6910a6e0898b1c
Author: Mridul Pathak <[email protected]>
AuthorDate: Thu Oct 29 19:54:46 2026 +0530

    Load the actions of a menu item
    
    ModelMenuItem looked for the <actions> element of a menu-item inside its 
condition instead of the menu-item element itself, where the widget-menu schema 
puts it, so the actions of a menu item were never loaded or run. They are now 
read from the menu-item element.
---
 .../src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java
 
b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java
index 2819b8c0a3..0dd937c590 100644
--- 
a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java
+++ 
b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuItem.java
@@ -157,7 +157,7 @@ public class ModelMenuItem extends ModelWidget {
             this.condition = null;
         }
         // read all actions under the "actions" element
-        Element actionsElement = UtilXml.firstChildElement(conditionElement, 
"actions");
+        Element actionsElement = UtilXml.firstChildElement(menuItemElement, 
"actions");
         if (actionsElement != null) {
             this.actions = AbstractModelAction.readSubActions(this, 
actionsElement);
         } else {

Reply via email to