Author: trong.tran
Date: 2009-11-27 01:27:37 -0500 (Fri, 27 Nov 2009)
New Revision: 827
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
Log:
GTNPORTAL-313 Fix IPC error which causes an infinite loop
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-11-27
04:07:01 UTC (rev 826)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-11-27
06:27:37 UTC (rev 827)
@@ -410,13 +410,13 @@
* page (usual layout or webos) which instance can be targeted by the
* event and then process the event on the associated UIPortlet component
*/
- for (Iterator<javax.portlet.Event> iter = events.iterator();
iter.hasNext();)
+ while(events.size() > 0)
{
- javax.portlet.Event nativeEvent = iter.next();
+ javax.portlet.Event nativeEvent = events.remove(0);
QName eventName = nativeEvent.getQName();
- for (Iterator iterator = portletInstancesInPage.iterator();
iterator.hasNext();)
+ for (Iterator<UIPortlet> iterator = portletInstancesInPage.iterator();
iterator.hasNext();)
{
- UIPortlet uiPortletInPage = (UIPortlet)iterator.next();
+ UIPortlet uiPortletInPage = iterator.next();
if (uiPortletInPage.supportsProcessingEvent(eventName)
&& !eventsWrapper.isInvokedTooManyTimes(uiPortletInPage))
{
@@ -439,7 +439,6 @@
log.info("The portlet: " +
uiPortletInPage.getPortletContext().getId()
+ " processEvent() method has generated new events
itself");
events.addAll(newEvents);
- uiPortlet.createEvent("ProcessEvents", Phase.PROCESS,
context).broadcast();
}
}
}
Show replies by date