ICEfaces
  1. ICEfaces
  2. ICE-8914

ace:panel - Add 'disableInputs' attribute to disable all input fields in the panel

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P3
    • Salesforce Case Reference:
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      Feature Request: Add the ability to disable all input fields located in an ace:panel without individually changing each component. This functionality would be different than disabling the functionality of the ace:panel itself (expand/contract).

        Activity

        Hide
        Arturo Zambrano added a comment -

        Committed new feature to the trunk at revision 33754.

        Testing notes:
        1. Create a new test page with an ace:panel containing some input components.
        2. Add the new 'disableInputs' attribute to the ace:panel and bind its value to a boolean property. Also bind the same property to a checkbox outside the panel.
        3. Add an h:commandButton outside the panel to submit the whole form.
        4. Verify that when this option is activated, when submitting the form, the values of these input components aren't sent to the server in the request body. Also verify that when this option is deactivated, the values of these input components are sent to the server.

        Note: This option only affects the components in the client. It doesn't change their internal state. Thus, some components might not look disabled, as when using their own disabled attribute, because their renderers won't be aware that these components are disabled and won't apply all the extra styling and markup when they are disabled. However, their input elements in the client should be disabled and their values not included in the request body.

        Show
        Arturo Zambrano added a comment - Committed new feature to the trunk at revision 33754. Testing notes: 1. Create a new test page with an ace:panel containing some input components. 2. Add the new 'disableInputs' attribute to the ace:panel and bind its value to a boolean property. Also bind the same property to a checkbox outside the panel. 3. Add an h:commandButton outside the panel to submit the whole form. 4. Verify that when this option is activated, when submitting the form, the values of these input components aren't sent to the server in the request body. Also verify that when this option is deactivated, the values of these input components are sent to the server. Note: This option only affects the components in the client. It doesn't change their internal state. Thus, some components might not look disabled, as when using their own disabled attribute, because their renderers won't be aware that these components are disabled and won't apply all the extra styling and markup when they are disabled. However, their input elements in the client should be disabled and their values not included in the request body.
        Hide
        Arturo Zambrano added a comment -

        Changed approach and committed code at revision 34259.

        Now, the inputs aren't disabled by using their 'disabled' attributes, since this could lead to problems when reverting the disableInputs flag when the inputs have different individual disabled states. Instead, an overlay is now placed over the panel's content, which prevents interaction with its contents. Also, all inputs and focusable elements inside the panel register an event handler that immediately blurs the element as soon as is gets focus, making the element unfocusable and thus preventing interaction with it.

        Show
        Arturo Zambrano added a comment - Changed approach and committed code at revision 34259. Now, the inputs aren't disabled by using their 'disabled' attributes, since this could lead to problems when reverting the disableInputs flag when the inputs have different individual disabled states. Instead, an overlay is now placed over the panel's content, which prevents interaction with its contents. Also, all inputs and focusable elements inside the panel register an event handler that immediately blurs the element as soon as is gets focus, making the element unfocusable and thus preventing interaction with it.
        Hide
        Ken Fyten added a comment -

        Re-open to review the input element blocking technique being used.

        Show
        Ken Fyten added a comment - Re-open to review the input element blocking technique being used.
        Hide
        Arturo Zambrano added a comment -

        Committed improvement at revision 35190. Implemented disableInputs using event sinks to block any kind of events.

        Show
        Arturo Zambrano added a comment - Committed improvement at revision 35190. Implemented disableInputs using event sinks to block any kind of events.
        Hide
        Arturo Zambrano added a comment -

        Revision 35219: Moved this code to blockui.js and refactored it, so that it can be reused.

        Show
        Arturo Zambrano added a comment - Revision 35219: Moved this code to blockui.js and refactored it, so that it can be reused.
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces EE-3.3.0 maintenance branch, ICEfaces 4 trunk r44499. Tomcat 7, IE 11, FF 34, Chrome 41.
        New test application /ICE-8914.jsf added to:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Nightly/panel
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/panel

        Show
        Liana Munroe added a comment - Verified ICEfaces EE-3.3.0 maintenance branch, ICEfaces 4 trunk r44499. Tomcat 7, IE 11, FF 34, Chrome 41. New test application / ICE-8914 .jsf added to: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Nightly/panel http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/panel

          People

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

            Dates

            • Created:
              Updated:
              Resolved: