Author: nbelaevski
Date: 2009-11-04 19:56:46 -0500 (Wed, 04 Nov 2009)
New Revision: 15828
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java
root/ui/trunk/components/core/src/main/java/org/richfaces/resource/PushResource.java
Log:
Fixed a4j:push functionality broken by changes in JSF spec
Modified: root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
---
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js 2009-11-05
00:47:56 UTC (rev 15827)
+++
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js 2009-11-05
00:56:46 UTC (rev 15828)
@@ -254,11 +254,11 @@
};
//
- var PUSH_RESOURCE_URL =
"#{resource['org.richfaces.resource.PushResource']}";
var pushTracker = {};
richfaces.startPush = function(options) {
var clientId = options.clientId;
+ var pushResourceUrl = options.pushResourceUrl;
var pushId = options.pushId;
var interval = options.interval;
var ondataavailable = options.ondataavailable;
@@ -270,7 +270,7 @@
type: "HEAD",
//TODO - encodeURIComponent; URL sessionId handling check
//TODO - add pushUri supports
- url: PUSH_RESOURCE_URL + "?id=" + pushId,
+ url: pushResourceUrl + "?id=" + pushId,
dataType: "text",
complete: function(xhr) {
var isPushActive = !!pushTracker[pushId];
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java 2009-11-05
00:47:56 UTC (rev 15827)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java 2009-11-05
00:56:46 UTC (rev 15828)
@@ -42,6 +42,7 @@
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.UIPush;
import org.richfaces.component.html.HtmlPush;
+import org.richfaces.resource.PushResource;
/**
* @author shura
@@ -98,6 +99,7 @@
}
options.put("interval", new Integer(interval));
+ options.put("pushResourceUrl", new PushResource().getRequestPath());
options.put("pushId", push.getListenerId(context));
options.put("clientId", component.getClientId(context));
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/resource/PushResource.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/resource/PushResource.java 2009-11-05
00:47:56 UTC (rev 15827)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/resource/PushResource.java 2009-11-05
00:56:46 UTC (rev 15828)
@@ -40,7 +40,8 @@
//TODO make this a singleton
public class PushResource extends AbstractBaseResource {
- @Override
+
+ @Override
public boolean isCacheable(FacesContext context) {
return false;
}
Show replies by date