Author: ilya_shaikovsky
Date: 2011-02-10 07:23:27 -0500 (Thu, 10 Feb 2011)
New Revision: 21594
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/attachQueue/samples/attachQueue-sample.xhtml
Log:
http://jira.jboss.org/browse/RF-10204
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml 2011-02-10
12:05:52 UTC (rev 21593)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml 2011-02-10
12:23:27 UTC (rev 21594)
@@ -5,14 +5,12 @@
xmlns:a4j="http://richfaces.org/a4j">
<p>In RichFaces 4 all request settings related to queue was moved
out of components attributes and now customization available using new
- a4j:attachQueue tag. Next sample shows how requestGroupingId (former
- similarityGroupingId) could be set for different components making the
- requests from them similar. Besides setting requestGroupingId - attach
- queue tag at second button redefines default queue request delay from
- 500ms to 1500ms.</p>
-
- <p>If you will click the buttons fast - requests will be combined
- and only last click will be processed</p>
+ <b>a4j:attachQueue</b> tag. Next sample shows how
<b>requestDelay</b>
+ could be changed for single component.</p>
+ <p>Note that when you typing in input - status appears with two
+ seconds delay because <b>default queue contains
requestDelay="2000"</b>.
+ And when you clicking save button - it appears immediately because
<b>requestDelay
+ changed to 0 for the button</b>.</p>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
<ui:include src="/templates/includes/source-view.xhtml">
<ui:param name="src" value="#{demoNavigator.sampleIncludeURI}"
/>
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/attachQueue/samples/attachQueue-sample.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/attachQueue/samples/attachQueue-sample.xhtml 2011-02-10
12:05:52 UTC (rev 21593)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/attachQueue/samples/attachQueue-sample.xhtml 2011-02-10
12:23:27 UTC (rev 21594)
@@ -5,24 +5,21 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <a4j:queue requestDelay="500"></a4j:queue>
+ <a4j:queue requestDelay="2000"/>
<h:form>
- <rich:panel>
- <h:panelGrid columns="2">
- <a4j:commandButton value="Set Name to Alex" render="rep">
- <a4j:attachQueue requestGroupingId="group1" />
- <a4j:param name="username" value="Alex"
assignTo="#{userBean.name}" />
- </a4j:commandButton>
-
- <a4j:commandButton value="Set Name to John" render="rep">
- <a4j:attachQueue requestGroupingId="group1"
requestDelay="1500" />
- <a4j:param name="username" value="John"
assignTo="#{userBean.name}" />
- </a4j:commandButton>
- </h:panelGrid>
+ <rich:panel bodyClass="bClass">
+ <h:outputText value="Type there:" />
+ <h:inputText>
+ <a4j:ajax event="keyup" />
+ </h:inputText>
+ <a4j:commandButton value="submit">
+ <a4j:attachQueue requestDelay="0" />
+ </a4j:commandButton>
+ <a4j:status>
+ <f:facet name="start">
+ Please wait...
+ </f:facet>
+ </a4j:status>
</rich:panel>
-
- <rich:panel>
- <h:outputText id="rep" value="Selected Name:#{userBean.name}"
/>
- </rich:panel>
</h:form>
</ui:composition>
\ No newline at end of file