ICEfaces
  1. ICEfaces
  2. ICE-7285

ace:menubar - MenuModel does not get reevaluated when re-initializing the model

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P1

      Description

      In the Williams app they have an action menu that can be changed depending on what view or tab is shown/selected. They are using the MenuModel to programatically change the menu items. This includes adding some JavaScript to the onclick event. Upon initial load the menu's onlcik events render without any issues. When the view/tab has been changed these onclick events get removed and only the ICEfaces events remain.

      The issue seems to be in the encodeEnd method of the MenubarRenderer. When the menubar is first loaded the following gets called:

      if(menu.shouldBuildFromModel()) {
      menu.buildMenuFromModel();
      }

      When the menubar is reinitialized the above code is skipped and just the "encodeMarkup(context, menu);" is just called. This causes the model to not be built with the customized code.

        Issue Links

          Activity

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: