You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/07/01 15:39:00 UTC

[jira] [Commented] (OFBIZ-12628) MenuItem doesn't follow correctly extend information

    [ https://issues.apache.org/jira/browse/OFBIZ-12628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561508#comment-17561508 ] 

ASF subversion and git services commented on OFBIZ-12628:
---------------------------------------------------------

Commit 7ea371bde3c06d6ae7f86b13a755672f92764aaf in ofbiz-framework's branch refs/heads/trunk from Nicolas Malin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=7ea371bde3 ]

Fixed: MenuItem doesn't follow correctly extended informations (OFBIZ-12628)

Fix a null pointer exception when the extended menu have an entry without link.

Thanks to Jacques Leroux for the alert


> 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
>            Priority: Minor
>             Fix For: 22.01.01
>
>         Attachments: OFBIZ-12628.patch
>
>
> 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.10#820010)