-
1. Re: a4j:queue doesn't delay request processing though requestDelay set
goncaloa Jan 19, 2013 8:26 AM (in response to goncaloa)I tried to debug the Ajax call through the Javascript files and found out that the queue options may not being passed to richfaces.queue.js.
I can see that Richfaces is trying to get requestDelay, ignoreDupResponses and other options but these are all undefined, which leads me to think that <a4j:queue> is not applying its attributes to the Ajax call.
Has anyone gone through this problem?
-
2. Re: a4j:queue doesn't delay request processing though requestDelay set
dejangunjic Feb 2, 2013 12:34 PM (in response to goncaloa)1 of 1 people found this helpfulI have same problem. Problem is because I am using richfaces and primefaces. When I remove primefaces from my project requestDelay works perfectly.
-
3. Re: a4j:queue doesn't delay request processing though requestDelay set
goncaloa Feb 4, 2013 4:37 AM (in response to dejangunjic)I'm also using Primefaces.
I'll try to find a way of overcoming this issue. If you find one, please post it here.
-
4. Re: a4j:queue doesn't delay request processing though requestDelay set
goncaloa Feb 6, 2013 7:05 AM (in response to goncaloa)I finally came up with a solution, so I'm going to share it.
I was using Richfaces 4.3.0 and Primefaces 3.4.2 and both have custom renderers for the <head> node. Primefaces adds its CSS and Javascript, while Richfaces adds the queueing stuff (among others).
When using both at the same time only the Primefaces renderer is called, so my solution was to override it.
1- First add your custom renderer to your faces-config.xml.
<faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> <render-kit> <renderer> <component-family>javax.faces.Output</component-family> <renderer-type>javax.faces.Head</renderer-type> <renderer-class>com.cardmobili.util.renderers.CardmobiliHeadRenderer</renderer-class> </renderer> </render-kit> <application> <locale-config> <default-locale>en</default-locale> <supported-locale>en</supported-locale> <supported-locale>pt</supported-locale> <supported-locale>nl</supported-locale> <supported-locale>es</supported-locale> </locale-config> </application> </faces-config>
2- Then create the renderer java class.
package com.cardmobili.util.renderers; import java.io.IOException; import javax.faces.component.UIComponent; import javax.faces.component.UIOutput; import javax.faces.context.FacesContext; import org.primefaces.renderkit.HeadRenderer; public class CardmobiliHeadRenderer extends HeadRenderer { private static final String QUEUE_RESOURCE_COMPONENT_RENDERER_TYPE = "org.richfaces.QueueResourceComponentRenderer"; @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { context.getRenderKit().getRenderer(UIOutput.COMPONENT_TYPE, QUEUE_RESOURCE_COMPONENT_RENDERER_TYPE).encodeEnd(context, component); super.encodeEnd(context, component); } }
And that's it. You have your Richfaces queues back