Author: nbelaevski
Date: 2008-12-08 12:36:50 -0500 (Mon, 08 Dec 2008)
New Revision: 11652
Added:
trunk/samples/queue-sample/src/main/webapp/pages/blocked-queue.xhtml
Modified:
trunk/samples/queue-sample/src/main/webapp/pages/events.xhtml
trunk/samples/queue-sample/src/main/webapp/templates/navigation.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5244
Added: trunk/samples/queue-sample/src/main/webapp/pages/blocked-queue.xhtml
===================================================================
--- trunk/samples/queue-sample/src/main/webapp/pages/blocked-queue.xhtml
(rev 0)
+++ trunk/samples/queue-sample/src/main/webapp/pages/blocked-queue.xhtml 2008-12-08
17:36:50 UTC (rev 11652)
@@ -0,0 +1,63 @@
+<html
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j">
+ <head>
+ <title>Events blocking and status check page</title>
+ </head>
+ <body>
+ <f:view>
+ <ui:include src="/templates/navigation.xhtml" />
+
+ <a4j:status startText="...link status - request running..."
startStyle="color: green" id="linkStatus" forceId="true"
/>
+ <a4j:status startText="...queue status - request running..."
startStyle="color: green" id="queueStatus" forceId="true"
/>
+ <h:form id="form">
+ <fieldset>
+
+ <h:outputLabel for="queueRequestDelay" value="Queue request delay
" />
+ <h:inputText id="queueRequestDelay"
value="#{bean.queueRequestDelay}">
+ <f:convertNumber />
+ </h:inputText>
+
+ <br />
+
+ <h:outputLabel for="clientRequestDelay" value="Client request
delay " />
+ <h:inputText id="clientRequestDelay"
value="#{bean.clientRequestDelay}">
+ <f:convertNumber />
+ </h:inputText>
+
+ <br />
+
+ <h:outputLabel for="processRequestDelay" value="Process request
delay " />
+ <h:inputText id="processRequestDelay"
value="#{bean.processRequestDelay}">
+ <f:convertNumber />
+ </h:inputText>
+
+ <br />
+
+ <h:outputLabel value="Poll enabled" for="pollEnabled" />
+ <h:selectBooleanCheckbox value="#{bean.pollEnabled}"
id="pollEnabled" />
+ <br />
+
+ <h:commandButton value="Apply values" />
+ <br />
+
+ </fieldset>
+ <a4j:queue name="queue" status="queueStatus"
size="3"
+ onrequestqueue="if (this.getSize() == this.getMaximumSize())
{document.getElementById('form:group').style.display = 'none'}"
+ onrequestdequeue="document.getElementById('form:group').style.display =
''"
+ requestDelay="#{bean.queueRequestDelay}" />
+
+ <h:panelGroup id="group">
+ <a4j:commandLink actionListener="#{bean.processActionListener}"
action="#{bean.processAction}"
+ value="Trigger link status" status="linkStatus"
eventsQueue="queue" /><br />
+ <a4j:commandLink actionListener="#{bean.processActionListener}"
action="#{bean.processAction}"
+ value="Trigger queue status" eventsQueue="queue" /><br
/>
+ <a4j:commandLink actionListener="#{bean.processActionListener}"
action="#{bean.processAction}"
+ value="Trigger queue status II" eventsQueue="queue" /><br
/>
+ </h:panelGroup>
+ </h:form>
+ </f:view>
+ </body>
+</html>
Modified: trunk/samples/queue-sample/src/main/webapp/pages/events.xhtml
===================================================================
--- trunk/samples/queue-sample/src/main/webapp/pages/events.xhtml 2008-12-08 17:36:10 UTC
(rev 11651)
+++ trunk/samples/queue-sample/src/main/webapp/pages/events.xhtml 2008-12-08 17:36:50 UTC
(rev 11652)
@@ -28,14 +28,18 @@
<td colspan="4">Queue - Q, Component - C</td>
</tr>
<tr id="handlersTableHeaders">
+ <td>onrequestqueue</td>
<td>onsubmit</td>
<td>onbeforedomupdate</td>
+ <td>onrequestdequeue</td>
<td>oncomplete</td>
<td>onerror</td>
</tr>
<tr>
+ <td id="onrequestqueueElt"></td>
<td id="onsubmitElt"></td>
<td id="onbeforedomupdateElt"></td>
+ <td id="onrequestdequeueElt"></td>
<td id="oncompleteElt"></td>
<td id="onerrorElt"></td>
</tr>
@@ -60,6 +64,8 @@
resetCells();
var events = {
+ "onrequestqueue": ["query", "options",
"event"],
+ "onrequestdequeue": ["query", "options",
"event"],
"onbeforedomupdate": ["request", "event",
"data"],
"onsubmit": ["request"],
"oncomplete": ["request", "event", "data"],
@@ -80,7 +86,9 @@
}
//]]></script>
<a4j:queue name="queue"
onsubmit="handlers['queue:onsubmit'](request)"
onerror="handlers['queue:onerror'](request, status, message)"
- oncomplete="handlers['queue:oncomplete'](request, event, data)"
onbeforedomupdate="handlers['queue:onbeforedomupdate'](request, event,
data)" />
+ onrequestdequeue="handlers['queue:onrequestdequeue'](query, options,
event)" onrequestqueue="handlers['queue:onrequestqueue'](query, options,
event)"
+ oncomplete="handlers['queue:oncomplete'](request, event, data)"
+ onbeforedomupdate="handlers['queue:onbeforedomupdate'](request, event,
data)" />
<h:form>
<h:panelGrid columns="1">
Modified: trunk/samples/queue-sample/src/main/webapp/templates/navigation.xhtml
===================================================================
--- trunk/samples/queue-sample/src/main/webapp/templates/navigation.xhtml 2008-12-08
17:36:10 UTC (rev 11651)
+++ trunk/samples/queue-sample/src/main/webapp/templates/navigation.xhtml 2008-12-08
17:36:50 UTC (rev 11652)
@@ -14,6 +14,8 @@
<h:outputLink value="sized-queue.jsf">Size exceed
behaviors</h:outputLink>
<h:outputText value=" " />
<h:outputLink value="events.jsf">Events handling</h:outputLink>
+ <h:outputText value=" " />
+ <h:outputLink value="blocked-queue.jsf">Queue blocking and
status</h:outputLink>
<br />
</ui:composition>