ICEfaces
  1. ICEfaces
  2. ICE-7323

Add ability to disable/enable menuItems (and subMenus) via component attribute and JavaScript API.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1.0.BETA2, 3.1.0.RC1, 3.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      *
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      Enhancement to the ace:menus to support both a component "enabled" attribute as well as a new JavaScript API to enable/disable them.
      1. screenshot-3.jpg
        44 kB
      2. screenshot-2.jpg
        40 kB
      3. screenshot-1.jpg
        32 kB

        Issue Links

          Activity

          Hide
          Arturo Zambrano added a comment -

          Committed new feature at revision 29180. Added 'disabled' attribute to ace:menuItem, ace:submenu, and ace:multiColumnMenu.

          Show
          Arturo Zambrano added a comment - Committed new feature at revision 29180. Added 'disabled' attribute to ace:menuItem, ace:submenu, and ace:multiColumnMenu.
          Hide
          Brennan Mckinney added a comment -

          The disabled attribute breaks the styling of an ace:menu when it's changed dynamically, turning it from the actual menu into a standard html list. Changing the value back doesn't do anything to solve the issue, and a reset is required to get the right look back.

          See attached screenshots. Tested using menuDisable.xhtml at http://server.ice:8888/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Nightly/menu/

          Show
          Brennan Mckinney added a comment - The disabled attribute breaks the styling of an ace:menu when it's changed dynamically, turning it from the actual menu into a standard html list. Changing the value back doesn't do anything to solve the issue, and a reset is required to get the right look back. See attached screenshots. Tested using menuDisable.xhtml at http://server.ice:8888/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Nightly/menu/
          Hide
          Brennan Mckinney added a comment -

          What the ace:menu looks like before any changes

          Show
          Brennan Mckinney added a comment - What the ace:menu looks like before any changes
          Hide
          Brennan Mckinney added a comment -

          After disabling one of the elements in the menu. Styling has gone.

          Show
          Brennan Mckinney added a comment - After disabling one of the elements in the menu. Styling has gone.
          Hide
          Brennan Mckinney added a comment -

          Re-enabled. Submenu works again, but styling is unchanged.

          Show
          Brennan Mckinney added a comment - Re-enabled. Submenu works again, but styling is unchanged.
          Hide
          Arturo Zambrano added a comment -

          It seems to be a more general problem when making any dynamic updates. The same problem can be seen in the menuDynAttribute.jsf test page: checking the 'rendered' box first and then checking the 'tiered' box displays the menu as a plain HTML list. This is caused by having a client id in the top <ul> element. so that will have to be changed, but it does have some javascript implications. This could potentially also affect other menu components, since they also set a client id to the top <ul> element. Perhaps a new JIRA should be created to track this issue?

          Show
          Arturo Zambrano added a comment - It seems to be a more general problem when making any dynamic updates. The same problem can be seen in the menuDynAttribute.jsf test page: checking the 'rendered' box first and then checking the 'tiered' box displays the menu as a plain HTML list. This is caused by having a client id in the top <ul> element. so that will have to be changed, but it does have some javascript implications. This could potentially also affect other menu components, since they also set a client id to the top <ul> element. Perhaps a new JIRA should be created to track this issue?
          Hide
          Arturo Zambrano added a comment -

          Committed fix, as part of ICE-8241, that solves this last issue.

          Show
          Arturo Zambrano added a comment - Committed fix, as part of ICE-8241 , that solves this last issue.

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              yip.ng
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: