ICEfaces
  1. ICEfaces
  2. ICE-11006

mobi:flipswitch fails to update when using non-ace:ajax to submit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: EE-4.1.0.RC1, EE-4.1.0.GA, 4.2.BETA, 4.2
    • Component/s: MOBI-Components
    • Labels:
      None
    • Environment:
      ICEfaces 4 trunk r48638. Tomcat 7/8, FF 43, Chrome 50, IE 11.
    • Assignee Priority:
      P3
    • Affects:
      Compatibility/Configuration

      Description

      A mobi:flipswitch that does not use ace:ajax fails to update it's value. A browser console error is seen when toggling the flipswitch.
      FF: TypeError: ice.ace is undefined
      http://localhost:8080/flipswitch/javax.faces.resource/flipswitch.c.js.jsf?ln=org.icefaces.component.flipswitch&v=4_2_0_160418
      Line 3
      Chrome:
      Uncaught TypeError: Cannot read property 'setResetValue' of undefinedmobi.flipswitch.init @ flipswitch.c.js.jsf?ln=org.icefaces.component.flipswitch&v=4_2_0_160418:3onclick @ flipswitchDynAttribute.jsf:1

      This issue can be demonstrated using the QA flipswitch test app /flipswitchDynAttribute.jsf
      http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/flipswitch

      To reproduce:
      Load the application and open the browser console.
      Select rendered the toggle the flipswitch, the console error is shown.
      Press submit. The value does not update accordingly.

        Activity

        Liana Munroe created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Assignee Judy Guglielmin [ judy.guglielmin ]
        Fix Version/s EE-4.1.0.GA [ 12171 ]
        Assignee Priority P3 [ 10012 ]
        Hide
        Judy Guglielmin added a comment -

        please add the ace namespace to the test page so that the ace library is loaded to the page and retest.
        xmlns:ace="http://www.icefaces.org/icefaces/components"

        This ensures that the ace library/resources are available for the component. There is a built in dependency for this component on the ace library.

        Show
        Judy Guglielmin added a comment - please add the ace namespace to the test page so that the ace library is loaded to the page and retest. xmlns:ace="http://www.icefaces.org/icefaces/components" This ensures that the ace library/resources are available for the component. There is a built in dependency for this component on the ace library.
        Ken Fyten made changes -
        Affects Compatibility/Configuration [ 10002 ]
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces 4 trunk r48665. Added the ace namespace to the test page. JS console error still appears, all browsers.
        TypeError: ice.ace is undefined
        http://localhost:8080/flipswitch/javax.faces.resource/flipswitch.c.js.jsf?ln=org.icefaces.component.flipswitch&v=4_2_0_160428
        Line 3

        Show
        Liana Munroe added a comment - Tested with ICEfaces 4 trunk r48665. Added the ace namespace to the test page. JS console error still appears, all browsers. TypeError: ice.ace is undefined http://localhost:8080/flipswitch/javax.faces.resource/flipswitch.c.js.jsf?ln=org.icefaces.component.flipswitch&v=4_2_0_160428 Line 3
        Ken Fyten made changes -
        Fix Version/s EE-4.1.0.BETA [ 13072 ]
        Hide
        Judy Guglielmin added a comment -

        rev. 48688.
        Rather than enforcing the user to load all the ace resources, if ice.ace namespace is present, the component will be registered for reset capability. If the namespace is not present, a console message (in the browser) states they should use <ace:ajax> if they would like the reset capability on this component.
        Since neither mobi:dateSpinner and mobi:timeSpinner have this functionality, the user should be allowed to use h input components with these components without ace resources (if they want to load least resources).
        If they want to fill in the input values and not submit, they can use <ace:ajax execute="none" render="none"/> to still load the ace resources and have the reset functionality registered.

        Show
        Judy Guglielmin added a comment - rev. 48688. Rather than enforcing the user to load all the ace resources, if ice.ace namespace is present, the component will be registered for reset capability. If the namespace is not present, a console message (in the browser) states they should use <ace:ajax> if they would like the reset capability on this component. Since neither mobi:dateSpinner and mobi:timeSpinner have this functionality, the user should be allowed to use h input components with these components without ace resources (if they want to load least resources). If they want to fill in the input values and not submit, they can use <ace:ajax execute="none" render="none"/> to still load the ace resources and have the reset functionality registered.
        Judy Guglielmin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #48688 Tue May 03 12:35:26 MDT 2016 judy.guglielmin ICE-11006 check for presence of ice.ace namespace before registering the component for the ice.ace reset capability. console message will appear suggesting use of ace:ajax should the user want the reset functionality for this component.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/mobi/component/resources/org.icefaces.component.flipswitch/flipswitch.js
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces EE-4.1.0 r48691. Tomcat 7/8, IE 11, 10, 9, 8, Chrome 50, FF 43.

        Note** When using flipswitch with an ace:ajax tag you must initialize the value of the flipswitch in the backing bean if running the application on a Tomcat 8.x server, otherwise there will be a NPE. This is not an issue with Tomcat 7.x.
        QA test app was updated accordingly.

        Show
        Liana Munroe added a comment - Verified ICEfaces EE-4.1.0 r48691. Tomcat 7/8, IE 11, 10, 9, 8, Chrome 50, FF 43. Note** When using flipswitch with an ace:ajax tag you must initialize the value of the flipswitch in the backing bean if running the application on a Tomcat 8.x server, otherwise there will be a NPE. This is not an issue with Tomcat 7.x. QA test app was updated accordingly.
        Ken Fyten made changes -
        Fix Version/s 4.2.BETA [ 13091 ]
        Fix Version/s 4.2 [ 12870 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Judy Guglielmin
            Reporter:
            Liana Munroe
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: