Author: nbelaevski
Date: 2007-12-10 19:35:09 -0500 (Mon, 10 Dec 2007)
New Revision: 4685
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-1573
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2007-12-11
00:26:30 UTC (rev 4684)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2007-12-11
00:35:09 UTC (rev 4685)
@@ -83,7 +83,7 @@
Set ajaxAreasToRender = new HashSet();
- Set ajaxRenderedAreas = new HashSet();
+ Set ajaxRenderedAreas = new LinkedHashSet();
boolean ajaxRequest = false;
@@ -118,7 +118,7 @@
ajaxAreasToRender = new HashSet();
- ajaxRenderedAreas = new HashSet();
+ ajaxRenderedAreas = new LinkedHashSet();
ajaxRequest = false;
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
---
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-12-11
00:26:30 UTC (rev 4684)
+++
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-12-11
00:35:09 UTC (rev 4685)
@@ -33,6 +33,7 @@
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
+import java.util.Set;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -87,16 +88,17 @@
UICalendar component) {
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- if (ajaxContext.isAjaxRequest()) {
- String clientId = component.getClientId(context);
-
- ajaxContext.getAjaxRenderedAreas().add(
+ Set ajaxRenderedAreas = ajaxContext.getAjaxRenderedAreas();
+ String clientId = component.getClientId(context);
+
+ if (ajaxContext.isAjaxRequest() && ajaxRenderedAreas.contains(clientId)) {
+ ajaxRenderedAreas.add(
clientId + "Popup");
- ajaxContext.getAjaxRenderedAreas().add(
+ ajaxRenderedAreas.add(
clientId + "IFrame");
- ajaxContext.getAjaxRenderedAreas().add(
+ ajaxRenderedAreas.add(
clientId + "Script");
}
}