ICEfaces
  1. ICEfaces
  2. ICE-6530

ACE javascript uses stale yuiProps and jsfProps

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ACE

      Description

      When investigating ICE-6337, I found that sliderEntry was referencing stale values for it's min and max values. Essentially, the initialize function gets yuiPropers and jsfProps parameters, which are visible from all the other inner functions which are used as callbacks for keyboard events, change events, and for server submission. These functions may be called much later. There may be form submissions after the initial page load and component initialize call, that may then change the state of the component, such that the fresh yuiProps and jsfProps need to be references, and the parameters to initialize are stale, and no longer relevant.

      I recommend a code audit of all the ACE components' javascript. Any references to the initialise props parameters within inner functions should be replaced with code to retrieve the appropriate props from the JSContext.

        Activity

        Mark Collette created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23897 Thu Feb 03 13:51:18 MST 2011 mark.collette ICE-6530 : ACE javascript uses stale yuiProps and jsfProps
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.sliderentry/slider.js
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 2.0.1 [ 10255 ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2
        Assignee Yip Ng [ yip.ng ]
        Hide
        Mark Collette added a comment -

        Fixed sliderEntry, by making each callback function get the JSContext and then re-get the JSFProps and JSProps.
        Subversion 23897

        Addition changes for sliderEntry were lumped in with the ICE-6337 commits. This involved going beyond JSFProps and JSProps, to not continue referencing stale references in callback functions, from the outer closures associated with the initialize function, that had since been replaced with new data by subsequent calls to updateProperties, which had not re-invoked initialise.

        Show
        Mark Collette added a comment - Fixed sliderEntry, by making each callback function get the JSContext and then re-get the JSFProps and JSProps. Subversion 23897 Addition changes for sliderEntry were lumped in with the ICE-6337 commits. This involved going beyond JSFProps and JSProps, to not continue referencing stale references in callback functions, from the outer closures associated with the initialize function, that had since been replaced with new data by subsequent calls to updateProperties, which had not re-invoked initialise.
        Hide
        yip.ng added a comment -

        checkboxbutton.js done. No change necessary.

        Show
        yip.ng added a comment - checkboxbutton.js done. No change necessary.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23950 Fri Feb 11 15:36:39 MST 2011 yip.ng ICE-6530: ACE javascript uses stale yuiProps and jsfProps.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.datetimeentry/calendar.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23951 Fri Feb 11 16:05:34 MST 2011 yip.ng ICE-6530: ACE javascript uses stale yuiProps and jsfProps.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.pushbutton/pushbutton.js
        Hide
        yip.ng added a comment -

        calendar.js done.

        Revision: 23950


        Modified : /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.datetimeentry/calendar.js

        Show
        yip.ng added a comment - calendar.js done. Revision: 23950 Modified : /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.datetimeentry/calendar.js
        Hide
        yip.ng added a comment -

        fileEntry.js done. No change necessary.

        Show
        yip.ng added a comment - fileEntry.js done. No change necessary.
        Hide
        yip.ng added a comment -

        linkbutton.js done. No change necessary.

        Show
        yip.ng added a comment - linkbutton.js done. No change necessary.
        Hide
        yip.ng added a comment -

        logger.js done. No change necessary.

        Show
        yip.ng added a comment - logger.js done. No change necessary.
        Hide
        yip.ng added a comment -

        pushbutton.js done.

        Revision: 23951


        Modified : /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.pushbutton/pushbutton.js

        Show
        yip.ng added a comment - pushbutton.js done. Revision: 23951 Modified : /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.pushbutton/pushbutton.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23958 Mon Feb 14 11:26:01 MST 2011 yip.ng ICE-6530: ACE javascript uses stale yuiProps and jsfProps.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.tab/tabset.js
        Hide
        yip.ng added a comment -

        tabset.js done.

        Revision: 23958


        Modified : /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.tab/tabset.js

        Show
        yip.ng added a comment - tabset.js done. Revision: 23958 Modified : /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.tab/tabset.js
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Assignee Priority P2
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            yip.ng
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: