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