ICEfaces
  1. ICEfaces
  2. ICE-8286

Changing the value of an ACE MenuButton corrupts it

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.0.0.GA, 3.1.0.BETA2
    • Fix Version/s: 3.1.0.RC1, 3.1, EE-3.0.0.GA_P01
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Tomcat 7, Chrome, Firefox, IE9
    • Assignee Priority:
      P1

      Description

      Attached is a deployable demo of the problem. Which contain two separate forms, one using the ace:ajax activate event, the other using standard JSF actionListener. After pulling up the page, click on either of the menus, and choose a menu button. After no more than two selections, the menu button is rendered as a plain button and the menu is no longer correct.
      1. Case11387.part1.rar
        5.00 MB
        Evgheni Sadovoi
      2. Case11387.part2.rar
        1.78 MB
        Evgheni Sadovoi
      1. ScreenShot.jpg
        40 kB

        Activity

        Hide
        Arturo Zambrano added a comment -

        Committed fix at revision 29727.

        This scenario had never been supported nor tested before. So, it was necessary to use a different technique to initialize the component in the client when only the button element is dynamically updated. Normally, we would remove all client ids from markup that is subject to be updated, like the menu items, but in this case the button needs to have a client id, so that the server can detect the source of the request and be able to decode it properly. So, another script tag to initialize the whole component was included inside the button tag. This script only executes onDOMready and if the button element has been replaced (i.e. doesn't have the jQueryUI styling). It wasn't convenient to remove the old script tag, since it initializes the component faster, since it doesn't have to wait until the whole DOM is ready.

        Only one minor issue was still noticed in Chrome (even before the fix). When choosing an item in the menu, the menu button is rendered under the text, as if it was a block element. There is nothing that can be done from the component code to avoid this. That just seems to be the way Chrome works. However, it is possible to fix this issue at the markup level by placing the text and the menu button inside a table (and in the same row) or by using 'display: table-row' and 'display: table-cell' where appropriate.

        Show
        Arturo Zambrano added a comment - Committed fix at revision 29727. This scenario had never been supported nor tested before. So, it was necessary to use a different technique to initialize the component in the client when only the button element is dynamically updated. Normally, we would remove all client ids from markup that is subject to be updated, like the menu items, but in this case the button needs to have a client id, so that the server can detect the source of the request and be able to decode it properly. So, another script tag to initialize the whole component was included inside the button tag. This script only executes onDOMready and if the button element has been replaced (i.e. doesn't have the jQueryUI styling). It wasn't convenient to remove the old script tag, since it initializes the component faster, since it doesn't have to wait until the whole DOM is ready. Only one minor issue was still noticed in Chrome (even before the fix). When choosing an item in the menu, the menu button is rendered under the text, as if it was a block element. There is nothing that can be done from the component code to avoid this. That just seems to be the way Chrome works. However, it is possible to fix this issue at the markup level by placing the text and the menu button inside a table (and in the same row) or by using 'display: table-row' and 'display: table-cell' where appropriate.
        Hide
        Arturo Zambrano added a comment -

        Applied fix to maintenance branch at revision 29765.

        Show
        Arturo Zambrano added a comment - Applied fix to maintenance branch at revision 29765.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Evgheni Sadovoi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: