Author: nbelaevski
Date: 2008-12-08 12:36:10 -0500 (Mon, 08 Dec 2008)
New Revision: 11651
Modified:
trunk/ui/core/src/main/config/component/queue.xml
trunk/ui/core/src/main/java/org/ajax4jsf/component/UIQueue.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/QueueRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-5244
Modified: trunk/ui/core/src/main/config/component/queue.xml
===================================================================
--- trunk/ui/core/src/main/config/component/queue.xml 2008-12-08 17:34:44 UTC (rev 11650)
+++ trunk/ui/core/src/main/config/component/queue.xml 2008-12-08 17:36:10 UTC (rev 11651)
@@ -93,7 +93,20 @@
<classname>java.lang.String</classname>
<description>A script expression; a size is exceed</description>
</property>
+ <property>
+ <name>onrequestqueue</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>onrequestdequeue</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>status</name>
+ <classname>java.lang.String</classname>
+ </property>
+
<property hidden="true">
<name>rendered</name>
</property>
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/component/UIQueue.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/component/UIQueue.java 2008-12-08 17:34:44
UTC (rev 11650)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/component/UIQueue.java 2008-12-08 17:36:10
UTC (rev 11651)
@@ -75,7 +75,11 @@
public abstract boolean isIgnoreDupResponses();
public abstract void setIgnoreDupResponses(boolean ignoreDupResponses);
+ public abstract String getOnrequestqueue();
+ public abstract void setOnrequestqueue(String onrequestqueue);
+ public abstract String getOnrequestdequeue();
+ public abstract void setOnrequestdequeue(String onrequestdequeue);
@Override
public String getFamily() {
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/QueueRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/QueueRenderer.java 2008-12-08
17:34:44 UTC (rev 11650)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/QueueRenderer.java 2008-12-08
17:36:10 UTC (rev 11651)
@@ -118,6 +118,16 @@
data.addQueueAttribute("onsizeexceeded", new
JSFunctionDefinition("query", "options",
"event").addToBody(onsizeexceeded));
}
+ String onrequestqueue = queue.getOnrequestqueue();
+ if (utils.shouldRenderAttribute(onrequestqueue)) {
+ data.addQueueAttribute("onrequestqueue", new
JSFunctionDefinition("query", "options",
"event").addToBody(onrequestqueue));
+ }
+
+ String onrequestdequeue = queue.getOnrequestdequeue();
+ if (utils.shouldRenderAttribute(onrequestdequeue)) {
+ data.addQueueAttribute("onrequestdequeue", new
JSFunctionDefinition("query", "options",
"event").addToBody(onrequestdequeue));
+ }
+
for (String attributeName : REQUEST_ATTRIBUTES) {
Object value = attributes.get(attributeName);
if (utils.shouldRenderAttribute(value)) {
@@ -125,6 +135,11 @@
}
}
+ String status = AjaxRendererUtils.getAjaxStatus(queue);
+ if (utils.shouldRenderAttribute(status)) {
+ data.addRequestAttribute(AjaxRendererUtils.STATUS_ATTR_NAME, status);
+ }
+
String onBeforeDomUpdate = queue.getOnbeforedomupdate();
if (utils.shouldRenderAttribute(onBeforeDomUpdate)) {
data.addRequestAttribute(QUEUE_ONBEFOREDOMUPDATE_ATTRIBUTE,
AjaxRendererUtils.buildAjaxOnBeforeDomUpdate(onBeforeDomUpdate));