ICEfaces
  1. ICEfaces
  2. ICE-11262

Disabled ace:pushButton, ace:linkButton, ace:checkboxButton, ace:radioButtons can still trigger events

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.2
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces4 trunk r51092
      Server: Tomcat7
      Browsers: all

      Description

      The disabled property of the ace:pushButton seems to cause the graphical part of the button to become disabled. The button can still be clicked, and still carries out events.

      QA test: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/pushButton

      Test page: /pushButtonDisabled.jsf


      This is also an issue with ace:linkButton, ace:checkboxButton, and ace:radioButton.
      QA test apps:
      http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/linkButton
      http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/checkboxButton
      http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/radioButton

      Test pages: /linkButtonDisabled.jsf
      /checkboxButtonDisabled.jsf
      /radioButtonDisabled.jsf

        Activity

        Hide
        Ken Fyten added a comment -

        When disabled=true, it should not be possible to click the button at all, no events should be triggered, etc.

        Show
        Ken Fyten added a comment - When disabled=true, it should not be possible to click the button at all, no events should be triggered, etc.
        Hide
        Arturo Zambrano added a comment - - edited

        r51119: various fixes to make ace:pushButton truly disabled when disabled="true": 1) render disabled="disabled" on button element 2) avoid rendering on* passthrough attributes 3) render script to erase on* passthrough attributes added with the <f:passThroughAttribute /> tag

        The button was still already disabled on the server side. Passthough attributes for DOM events (onclick, etc.) were still being rendered on the button element. Passthrough attributes added with the <f:passThroughAttribute /> tag aren't controlled by the renderer class and are added to the root element. So, the solution to this was to render a script to erase the content of those attributes on the root element, when disabled="true".

        I'll check if other buttons require this treatment as well.

        Show
        Arturo Zambrano added a comment - - edited r51119: various fixes to make ace:pushButton truly disabled when disabled="true": 1) render disabled="disabled" on button element 2) avoid rendering on* passthrough attributes 3) render script to erase on* passthrough attributes added with the <f:passThroughAttribute /> tag The button was still already disabled on the server side. Passthough attributes for DOM events (onclick, etc.) were still being rendered on the button element. Passthrough attributes added with the <f:passThroughAttribute /> tag aren't controlled by the renderer class and are added to the root element. So, the solution to this was to render a script to erase the content of those attributes on the root element, when disabled="true". I'll check if other buttons require this treatment as well.
        Hide
        Arturo Zambrano added a comment -

        r51121: various fixes to make ace:linkButton, ace:checkboxButton, and ace:radioButton truly disabled when disabled="true": 1) render disabled="disabled" on button element 2) avoid rendering on* passthrough attributes 3) render script to erase on* passthrough attributes added with the <f:passThroughAttribute />

        Show
        Arturo Zambrano added a comment - r51121: various fixes to make ace:linkButton, ace:checkboxButton, and ace:radioButton truly disabled when disabled="true": 1) render disabled="disabled" on button element 2) avoid rendering on* passthrough attributes 3) render script to erase on* passthrough attributes added with the <f:passThroughAttribute />
        Hide
        Carmen Cristurean added a comment -

        Verified IF4 trunk r.51122 on IE11, IE8, Chrome56, MsEdge38, FF39.

        Show
        Carmen Cristurean added a comment - Verified IF4 trunk r.51122 on IE11, IE8, Chrome56, MsEdge38, FF39.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Carmen Cristurean
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: