You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Nicolas Malin (Jira)" <ji...@apache.org> on 2022/05/31 15:25:00 UTC
[jira] [Created] (OFBIZ-12628) MenuItem doesn't follow correctly extend information
Nicolas Malin created OFBIZ-12628:
-------------------------------------
Summary: MenuItem doesn't follow correctly extend information
Key: OFBIZ-12628
URL: https://issues.apache.org/jira/browse/OFBIZ-12628
Project: OFBiz
Issue Type: Bug
Components: framework/widget
Affects Versions: 22.01.01, Upcoming Branch
Reporter: Nicolas Malin
Assignee: Nicolas Malin
When you use two menus where the second extend the first, menu item and menu link aren't propage correctly.
The menu items and menu link presents on the second menu already have the first menu on their model.
{code:java}
<menu name="FirstMenu" extends="CommonInlineBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
<menu-item name="MyItem">
<link target="GoAction"/>
</menu-item>
</menu>
<menu name="SecondMenu" extends="FirstMenu"/> {code}
The result, if during the rendering some information are generate from the menu, in the previous case, it's always the "FirstMenu" that would be use.
To solve it and don't break the thread safe pattern, I introduce two new constructor for ModelItem and MenuLink for duplicate the ModelMenuItem and MenuLink in memory with the new parent.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)