Uploaded image for project: 'Click'
  1. Click
  2. CLK-69

Using menu.xml causes every page in menu to instantiate every page load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • core, examples
    • None

    Description

      Add the following line to the Menu example class MenuPage:
      public MenuPage()

      { System.out.println("Created a menu page " + this ); addControl(new Menu("rootMenu")); }

      Start the examples, access menu. NOte the following:

      • on page load, menus A1, B1, C1, A2, A3, A4, A5 instantiate.
      • click on B Menu - menus A1, B1, C1, B2, B3, B4, B5, B6 instantiate
      • click on A Menu again - menus A1, B1, C1, A2, A3, A4, A5 instantiate - note they are new instances.

      What I would expect to see would be the same Menu instances reused at a minimum. The rootMenu is a static - I can appreciate that different users may have permission restrictions on some menu options, but creating new instances for each menu in the menu.xml on every page load is not right.

      Attachments

        Activity

          People

            medgar Malcolm Edgar
            ghopson Geoff Hopson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: