Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12628

MenuItem doesn't follow correctly extend information

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Upcoming Branch, 22.01.01
    • 22.01.01
    • framework/widget
    • None

    Description

      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.

       

      <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"/> 

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            nmalin Nicolas Malin
            nmalin Nicolas Malin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment