ICEfaces
  1. ICEfaces
  2. ICE-8753

Components using an instance registry might not work well in portlets

    Details

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

      Description

      Components such as ace:autoCompleteEntry and ace:richTextEntry, which keep a global variable storing references to each component instance on the page, might not work properly in a portlet environment. Specifically, having more than one component instance per page might cause other instances not to work at all.

        Activity

        Migration created issue -
        Hide
        Arturo Zambrano added a comment - - edited

        On portlet pages having 2 or more instances of ace:autoCompleteEntry or ace:richTextEntry, it was observed that only the very last instance loaded was working correctly, while the others weren't working at all, fired errors or had odd behaviours. The reason is that the global variable that keeps references to the instances is replaced every time the javascript resources are loaded per portlet. This causes the loss of all the references to all the instances that were previously registered.

        The fix, in most cases, consists of simply checking if the global registry variable already exists before creating it.

        was:
        Components such as ace:autoCompleteEntry and ace:richTextEntry, which keep a global variable storing references to each component instance on the page, might not work properly in a portlet environment. Specifically, having more than one component instance per page might cause other instances not to work at all.

        On portlet pages having 2 or more instances of ace:autoCompleteEntry and ace:richTextEntry, it was observed that only the very last instance loaded was working correctly, while the others weren't working at all, fired errors or had odd behaviours. The reason is that the global variable that keeps references to the instances is replaced every time the javascript resources are loaded per portlet. This causes the loss of all the references to all the instances that were previously registered.

        The fix, in most cases, consists of simply checking if the global registry variable already exists before creating it.

        Show
        Arturo Zambrano added a comment - - edited On portlet pages having 2 or more instances of ace:autoCompleteEntry or ace:richTextEntry, it was observed that only the very last instance loaded was working correctly, while the others weren't working at all, fired errors or had odd behaviours. The reason is that the global variable that keeps references to the instances is replaced every time the javascript resources are loaded per portlet. This causes the loss of all the references to all the instances that were previously registered. The fix, in most cases, consists of simply checking if the global registry variable already exists before creating it. was: Components such as ace:autoCompleteEntry and ace:richTextEntry, which keep a global variable storing references to each component instance on the page, might not work properly in a portlet environment. Specifically, having more than one component instance per page might cause other instances not to work at all. On portlet pages having 2 or more instances of ace:autoCompleteEntry and ace:richTextEntry, it was observed that only the very last instance loaded was working correctly, while the others weren't working at all, fired errors or had odd behaviours. The reason is that the global variable that keeps references to the instances is replaced every time the javascript resources are loaded per portlet. This causes the loss of all the references to all the instances that were previously registered. The fix, in most cases, consists of simply checking if the global registry variable already exists before creating it.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32064 Thu Nov 08 11:38:55 MST 2012 art.zambrano ICE-8753 added condition to only declare registry objects if they don't exist already, in order to avoid issues with portlets
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/wijmo/wijmo.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/tooltip/tooltip.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/dataexporter/dataexporter.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/chart/chart.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/list/list.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/gmap/gmap.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/listcontrol/listcontrol.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Hide
        Arturo Zambrano added a comment - - edited

        Committed fix to trunk at revision 32064.
        This is the list of components, using registry objects, that were modified:
        ace:autoCompleteEntry
        ace:dataExporter
        ace:gMap
        ace:tooltip
        ace menu components
        ace:list (list.js and listcontrol.js)
        ace:chart
        These components also use registries but were already using a portlet-friendly technique to initialize the registries:
        ace:richTextEntry
        ace:datatable

        Show
        Arturo Zambrano added a comment - - edited Committed fix to trunk at revision 32064. This is the list of components, using registry objects, that were modified: ace:autoCompleteEntry ace:dataExporter ace:gMap ace:tooltip ace menu components ace:list (list.js and listcontrol.js) ace:chart These components also use registries but were already using a portlet-friendly technique to initialize the registries: ace:richTextEntry ace:datatable
        Migration made changes -
        Field Original Value New Value
        Reporter Migration [ remote ] Arturo Zambrano [ artzambrano ]
        Migration made changes -
        Assignee Arturo Zambrano [ artzambrano ]
        Migration made changes -
        Description
        Components such as ace:autoCompleteEntry and ace:richTextEntry, which keep a global variable storing references to each component instance on the page, might not work properly in a portlet environment. Specifically, having more than one component instance per page might cause other instances not to work at all.

        On portlet pages having 2 or more instances of ace:autoCompleteEntry and ace:richTextEntry, it was observed that only the very last instance loaded was working correctly, while the others weren't working at all, fired errors or had odd behaviours. The reason is that the global variable that keeps references to the instances is replaced every time the javascript resources are loaded per portlet. This causes the loss of all the references to all the instances that were previously registered.

        The fix, in most cases, consists of simply checking if the global registry variable already exists before creating it.
        Components such as ace:autoCompleteEntry and ace:richTextEntry, which keep a global variable storing references to each component instance on the page, might not work properly in a portlet environment. Specifically, having more than one component instance per page might cause other instances not to work at all.
        Migration made changes -
        Fix Version/s 3.3 [ 10370 ]
        Fix Version/s EE-3.2.0.GA [ 10332 ]
        Migration made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: