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

        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.
        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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: