Author: lfryc(a)redhat.com
Date: 2010-09-14 12:27:08 -0400 (Tue, 14 Sep 2010)
New Revision: 19201
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nested.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml
Removed:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/wrapped.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml
Log:
a4j:attachQueue - modifications for beans and pages; added nestedExtension.xhtml page
(RFPL-734)
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java 2010-09-14
16:23:00 UTC (rev 19200)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/A4JAttachQueueBean.java 2010-09-14
16:27:08 UTC (rev 19201)
@@ -59,14 +59,27 @@
// initialize attributes
attributes = Attributes.getUIComponentAttributes(UIAttachQueue.class,
getClass());
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("requestDelay", 1500);
+ initializeAttributes(attributes);
+ attributes.setAttribute("requestDelay", 500);
attributes2 = Attributes.getUIComponentAttributes(UIAttachQueue.class,
getClass());
- attributes2.setAttribute("rendered", true);
+ initializeAttributes(attributes2);
attributes2.setAttribute("requestDelay", 1500);
-
}
+
+ private void initializeAttributes(Attributes attributes) {
+ attributes.setAttribute("rendered", true);
+
+ // hidden attributes
+ attributes.remove("queueId");
+
+ // not implemented yet
+ // TODO RFPL-734
+ attributes.remove("name");
+ attributes.remove("timeout");
+ attributes.remove("requestGroupingId");
+ attributes.remove("ignoreDupResponses");
+ }
public Attributes getAttributes() {
return attributes;
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml
(from rev 19188,
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/wrapped.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml 2010-09-14
16:27:08 UTC (rev 19201)
@@ -0,0 +1,113 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
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"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
xmlns:rich="http://richfaces.org/rich">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <script type="text/javascript">
+ function add(element) {
+ element.innerHTML = 1 + parseInt(element.innerHTML);
+ }
+
+ function updateDifferenceTime() {
+ var eventTime1 =
parseInt(jQuery(#{rich:element('eventTime1:outputTime')}).attr('title'));
+ var eventTime2 =
parseInt(jQuery(#{rich:element('eventTime2:outputTime')}).attr('title'));
+ var beginTime =
parseInt(jQuery(#{rich:element('beginTime:outputTime')}).attr('title'));
+
+ var eventTime = Math.max(eventTime1, eventTime2);
+ jQuery(#{rich:element('differenceTime')}).text(beginTime -
eventTime);
+ }
+ </script>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <a4j:queue id="queue1"
ignoreDupResponses="#{a4jQueueBean.attributes['ignoreDupResponses'].value}"
+ name="#{a4jQueueBean.attributes['name'].value}"
+
onbeforedomupdate="#{a4jQueueBean.attributes['onbeforedomupdate'].value}"
+
oncomplete="#{a4jQueueBean.attributes['oncomplete'].value}"
+ onerror="#{a4jQueueBean.attributes['onerror'].value}"
onevent="#{a4jQueueBean.attributes['event'].value}"
+
onrequestdequeue="#{a4jQueueBean.attributes['onrequestdequeue'].value}"
+
onrequestqueue="#{a4jQueueBean.attributes['onrequestqueue'].value}"
+
onsubmit="#{a4jQueueBean.attributes['onsubmit'].value}"
+
rendered="#{a4jQueueBean.attributes['rendered'].value}"
+
requestDelay="#{a4jQueueBean.attributes['requestDelay'].value}"
status="status1"
+ timeout="#{a4jQueueBean.attributes['timeout'].value}"
/>
+
+ <a4j:ajax event="keyup" render="output1, output2"
execute="@form" onbegin="add(#{rich:element('requests')}); "
+
oncomplete="refresh(#{rich:element('completeTime:outputTime')});
updateDifferenceTime();"
onbeforedomupdate="add(#{rich:element('updates')});">
+ <a4j:attachQueue id="a4jAttachQueue"
+
ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
+
name="#{a4jAttachQueueBean.attributes['name'].value}"
+
onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
+
onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
+
queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
+
rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
+
requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
+
requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
+
timeout="#{a4jAttachQueueBean.attributes['timeout'].value}"/>
+
+ <h:inputText id="input1"
value="#{a4jAttachQueueBean.text1}"
onkeyup="add(#{rich:element('events')});"/>
+ <h:inputText id="input2"
value="#{a4jAttachQueueBean.text2}"
onkeyup="add(#{rich:element('events')});"/>
+ </a4j:ajax>
+
+ <h:panelGrid columns="2">
+ Output 1:
+ <h:outputText id="output1"
value="#{a4jAttachQueueBean.text1}" style="font-weight:bold;"/>
+ Output 2:
+ <h:outputText id="output2"
value="#{a4jAttachQueueBean.text2}" style="font-weight:bold;"/>
+ Events count:
+ <h:outputText value="0" id="events" />
+ Requests count:
+ <h:outputText value="0" id="requests" />
+ DOM updates count:
+ <h:outputText value="0" id="updates" />
+ Difference time:
+ <h:outputText value="" id="differenceTime" />
+ </h:panelGrid>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ Attributes for wrapping attach queue
+ <metamer:attributes value="#{a4jAttachQueueBean.attributes}"
id="attributes" />
+ <br />
+ Attributes for queue1
+ <br />
+ <metamer:attributes value="#{a4jQueueBean.attributes}"
id="queueAttributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml 2010-09-14
16:23:00 UTC (rev 19200)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml 2010-09-14
16:27:08 UTC (rev 19201)
@@ -30,13 +30,26 @@
<ui:define name="links">
- <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
- Page containing <b>a4j:attachQueue</b>, two inputs and input
boxes for all its attributes.
+ <metamer:testPageLink id="nested" outcome="nested"
value="Nested">
+ Twice <b>h:inputText</b> with nested
<b>a4j:ajax</b> with attached <b>a4j:attachQueue</b>.
+ <br />
+ Contains also one named <b>a4j:queue</b> to try queue naming
and attaching.
</metamer:testPageLink>
- <metamer:testPageLink id="wrapped" outcome="wrapped"
value="Wrapped">
- Page containing <b>a4j:attachQueue</b>, a4j:ajax wrapping two
inputs and input boxes for all its attributes.
+ <metamer:testPageLink id="extending"
outcome="extending" value="Extending">
+ <font color="red" style="font-weigth:
bold">Doesn't work currently due to RF-9351.</font>
+ <br />
+ Two <b>h:inputText</b>s are wrapped in
<b>a4j:ajax</b>, which is extended by <b>a4j:attachQueue</b>.
+ <br />
+ Contains also one named <b>a4j:queue</b> to try queue naming
and attaching.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="nestedExtension"
outcome="nestedExtension" value="Nested Extension">
+ <div><font color="red" style="font-weigth:
bold">Doesn't work currently due to RF-9351.</font></div>
+ <div>Two nested a4j:ajaxs, each extended by own
a4j:attachQueue.</div>
+ <div>First a4j:ajax controls clicks to h:inputText and
a4j:commandButton.</div>
+ <div>Second a4j:ajax controls valueChanges of
h:inputText.</div>
+ </metamer:testPageLink>
</ui:define>
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nested.xhtml
(from rev 19188,
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/simple.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nested.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nested.xhtml 2010-09-14
16:27:08 UTC (rev 19201)
@@ -0,0 +1,142 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
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"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
xmlns:rich="http://richfaces.org/rich">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <script type="text/javascript">
+ function add(element) {
+ element.innerHTML = 1 + parseInt(element.innerHTML);
+ }
+
+ function updateDifferenceTime() {
+ var eventTime1 =
parseInt(jQuery(#{rich:element('eventTime1:outputTime')}).attr('title'));
+ var eventTime2 =
parseInt(jQuery(#{rich:element('eventTime2:outputTime')}).attr('title'));
+ var beginTime =
parseInt(jQuery(#{rich:element('beginTime:outputTime')}).attr('title'));
+
+ var eventTime = Math.max(eventTime1, eventTime2);
+ jQuery(#{rich:element('differenceTime')}).text(beginTime -
eventTime);
+ }
+ </script>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <a4j:queue id="queue1"
ignoreDupResponses="#{a4jQueueBean.attributes['ignoreDupResponses'].value}"
+ name="#{a4jQueueBean.attributes['name'].value}"
+
onbeforedomupdate="#{a4jQueueBean.attributes['onbeforedomupdate'].value}"
+
oncomplete="#{a4jQueueBean.attributes['oncomplete'].value}"
+ onerror="#{a4jQueueBean.attributes['onerror'].value}"
onevent="#{a4jQueueBean.attributes['event'].value}"
+
onrequestdequeue="#{a4jQueueBean.attributes['onrequestdequeue'].value}"
+
onrequestqueue="#{a4jQueueBean.attributes['onrequestqueue'].value}"
+
onsubmit="#{a4jQueueBean.attributes['onsubmit'].value}"
+
rendered="#{a4jQueueBean.attributes['rendered'].value}"
+
requestDelay="#{a4jQueueBean.attributes['requestDelay'].value}"
status="status1"
+ timeout="#{a4jQueueBean.attributes['timeout'].value}"
/>
+
+ <h:inputText id="input1"
value="#{a4jAttachQueueBean.text1}"
onkeypress="add(#{rich:element('events1')});
refresh(#{rich:element('eventTime1:outputTime')}); ">
+ <a4j:ajax event="keypress" render="output1"
execute="@form" onbegin="add(#{rich:element('requests')});
refresh(#{rich:element('beginTime:outputTime')}); "
+
onbeforedomupdate="add(#{rich:element('updates')});"
oncomplete="refresh(#{rich:element('completeTime:outputTime')});
updateDifferenceTime(); ">
+ <a4j:attachQueue id="a4jAttachQueue1"
+
ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
+
name="#{a4jAttachQueueBean.attributes['name'].value}"
+
onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
+
onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
+
queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
+
rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
+
requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
+
requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
+
timeout="#{a4jAttachQueueBean.attributes['timeout'].value}"/>
+ </a4j:ajax>
+ </h:inputText>
+
+ <h:inputText id="input2"
value="#{a4jAttachQueueBean.text2}"
onkeypress="add(#{rich:element('events2')});
refresh(#{rich:element('eventTime2:outputTime')}); ">
+ <a4j:ajax event="keypress" render="output2"
execute="@form" onbegin="add(#{rich:element('requests')});
refresh(#{rich:element('beginTime:outputTime')}); "
+
onbeforedomupdate="add(#{rich:element('updates')});"
oncomplete="refresh(#{rich:element('completeTime:outputTime')});
updateDifferenceTime();">
+ <a4j:attachQueue id="a4jAttachQueue2"
+
ignoreDupResponses="#{a4jAttachQueueBean.attributes2['ignoreDupResponses'].value}"
+
name="#{a4jAttachQueueBean.attributes2['name'].value}"
+
onrequestdequeue="#{a4jAttachQueueBean.attributes2['onrequestdequeue'].value}"
+
onrequestqueue="#{a4jAttachQueueBean.attributes2['onrequestqueue'].value}"
+
queueId="#{a4jAttachQueueBean.attributes2['queueId'].value}"
+
rendered="#{a4jAttachQueueBean.attributes2['rendered'].value}"
+
requestDelay="#{a4jAttachQueueBean.attributes2['requestDelay'].value}"
+
requestGroupingId="#{a4jAttachQueueBean.attributes2['requestGroupingId'].value}"
+
timeout="#{a4jAttachQueueBean.attributes2['timeout'].value}"/>
+ </a4j:ajax>
+ </h:inputText>
+
+ <h:panelGrid columns="2">
+ Output 1:
+ <h:outputText id="output1"
value="#{a4jAttachQueueBean.text1}" style="font-weight:bold;"/>
+ Output 2:
+ <h:outputText id="output2"
value="#{a4jAttachQueueBean.text2}" style="font-weight:bold;"/>
+ Event 1 count:
+ <h:outputText value="0" id="events1" />
+ Event 2 count:
+ <h:outputText value="0" id="events2" />
+ Requests count:
+ <h:outputText value="0" id="requests" />
+ DOM updates count:
+ <h:outputText value="0" id="updates" />
+ Difference time:
+ <h:outputText value="" id="differenceTime" />
+ </h:panelGrid>
+
+ <h:panelGrid columns="1">
+ <metamer:clientTime id="eventTime1" label="Event 1
Time:" />
+ <metamer:clientTime id="eventTime2" label="Event 2
Time:" />
+ <metamer:clientTime id="beginTime" label="Begin
Time:" />
+ <metamer:clientTime id="completeTime" label="Complete
Time:" />
+ </h:panelGrid>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ Attributes for first attach queue (first input)
+ <br/>
+ <metamer:attributes value="#{a4jAttachQueueBean.attributes}"
id="attributes1" />
+ <br/>
+ Attributes for second attach queue (second input)
+ <br/>
+ <metamer:attributes value="#{a4jAttachQueueBean.attributes2}"
id="attributes2" />
+ <br />
+ Attributes for queue1
+ <br />
+ <metamer:attributes value="#{a4jQueueBean.attributes}"
id="queueAttributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml 2010-09-14
16:27:08 UTC (rev 19201)
@@ -0,0 +1,157 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
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"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <script type="text/javascript">
+ function add(element) {
+ element.innerHTML = 1 + parseInt(element.innerHTML);
+ }
+
+ function updateDifferenceTime() {
+ var eventTime1 =
parseInt(jQuery(#{rich:element('eventTime1:outputTime')}).attr('title'));
+ var eventTime2 =
parseInt(jQuery(#{rich:element('eventTime2:outputTime')}).attr('title'));
+ var beginTime =
parseInt(jQuery(#{rich:element('beginTime:outputTime')}).attr('title'));
+
+ var eventTime = Math.max(eventTime1, eventTime2);
+ jQuery(#{rich:element('differenceTime')}).text(beginTime -
eventTime);
+ }
+ </script>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <a4j:queue id="queue1"
ignoreDupResponses="#{a4jQueueBean.attributes['ignoreDupResponses'].value}"
+ name="#{a4jQueueBean.attributes['name'].value}"
+
onbeforedomupdate="#{a4jQueueBean.attributes['onbeforedomupdate'].value}"
+
oncomplete="#{a4jQueueBean.attributes['oncomplete'].value}"
+ onerror="#{a4jQueueBean.attributes['onerror'].value}"
onevent="#{a4jQueueBean.attributes['event'].value}"
+
onrequestdequeue="#{a4jQueueBean.attributes['onrequestdequeue'].value}"
+
onrequestqueue="#{a4jQueueBean.attributes['onrequestqueue'].value}"
+ onsubmit="#{a4jQueueBean.attributes['onsubmit'].value}"
+ rendered="#{a4jQueueBean.attributes['rendered'].value}"
+
requestDelay="#{a4jQueueBean.attributes['requestDelay'].value}"
status="status1"
+ timeout="#{a4jQueueBean.attributes['timeout'].value}"
/>
+
+ <a4j:ajax event="click" execute="@form"
+ onbegin="add(#{rich:element('requests')});
refresh(#{rich:element('beginTime:outputTime')}); "
+ onbeforedomupdate="add(#{rich:element('updates')});"
+ oncomplete="refresh(#{rich:element('completeTime:outputTime')});
updateDifferenceTime(); ">
+
+ <a4j:attachQueue id="a4jAttachQueue1"
+
ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
+ name="#{a4jAttachQueueBean.attributes['name'].value}"
+
onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
+
onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
+
queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
+
rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
+
requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
+
requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
+
timeout="#{a4jAttachQueueBean.attributes['timeout'].value}" />
+
+ <h:inputText id="input1"
value="#{a4jAttachQueueBean.text1}"
+ onclick="add(#{rich:element('events1')});
refresh(#{rich:element('eventTime1:outputTime')}); " />
+ <a4j:commandButton
+ onclick="add(#{rich:element('events1')});
refresh(#{rich:element('eventTime1:outputTime')}); "
+ id="a4jCommandButton1" value="First button" />
+
+ <a4j:ajax event="valueChange" render="output2"
execute="@form"
+ onbegin="add(#{rich:element('requests')});
refresh(#{rich:element('beginTime:outputTime')}); "
+ onbeforedomupdate="add(#{rich:element('updates')});"
+
oncomplete="refresh(#{rich:element('completeTime:outputTime')});
updateDifferenceTime();">
+
+ <h:inputText id="input2"
value="#{a4jAttachQueueBean.text2}"
+ onkeyup="add(#{rich:element('events2')});
refresh(#{rich:element('eventTime2:outputTime')}); " />
+ <a4j:commandButton id="a4jCommandButton2" value="First
button" />
+
+ <a4j:attachQueue id="a4jAttachQueue2"
+
ignoreDupResponses="#{a4jAttachQueueBean.attributes2['ignoreDupResponses'].value}"
+
name="#{a4jAttachQueueBean.attributes2['name'].value}"
+
onrequestdequeue="#{a4jAttachQueueBean.attributes2['onrequestdequeue'].value}"
+
onrequestqueue="#{a4jAttachQueueBean.attributes2['onrequestqueue'].value}"
+
queueId="#{a4jAttachQueueBean.attributes2['queueId'].value}"
+
rendered="#{a4jAttachQueueBean.attributes2['rendered'].value}"
+
requestDelay="#{a4jAttachQueueBean.attributes2['requestDelay'].value}"
+
requestGroupingId="#{a4jAttachQueueBean.attributes2['requestGroupingId'].value}"
+
timeout="#{a4jAttachQueueBean.attributes2['timeout'].value}" />
+
+
+ </a4j:ajax>
+
+ </a4j:ajax>
+
+ <h:panelGrid columns="2">
+ Output 1:
+ <h:outputText id="output1"
value="#{a4jAttachQueueBean.text1}" style="font-weight:bold;" />
+ Output 2:
+ <h:outputText id="output2"
value="#{a4jAttachQueueBean.text2}" style="font-weight:bold;" />
+ Event 1 count:
+ <h:outputText value="0" id="events1" />
+ Event 2 count:
+ <h:outputText value="0" id="events2" />
+ Requests count:
+ <h:outputText value="0" id="requests" />
+ DOM updates count:
+ <h:outputText value="0" id="updates" />
+ Difference time:
+ <h:outputText value="" id="differenceTime" />
+ </h:panelGrid>
+
+ <h:panelGrid columns="1">
+ <metamer:clientTime id="eventTime1" label="Event 1
Time:" />
+ <metamer:clientTime id="eventTime2" label="Event 2
Time:" />
+ <metamer:clientTime id="beginTime" label="Begin Time:"
/>
+ <metamer:clientTime id="completeTime" label="Complete
Time:" />
+ </h:panelGrid>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ Attributes for first attach queue (first input)
+ <br />
+ <metamer:attributes value="#{a4jAttachQueueBean.attributes}"
id="attributes" />
+ <br />
+ Attributes for second attach queue (second input)
+ <br />
+ <metamer:attributes value="#{a4jAttachQueueBean.attributes2}"
id="attributes2" />
+ <br />
+ Attributes for queue1
+ <br />
+ <metamer:attributes value="#{a4jQueueBean.attributes}"
id="queueAttributes" />
+ </ui:define>
+
+</ui:composition>
+</html>
\ No newline at end of file
Deleted:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/simple.xhtml 2010-09-14
16:23:00 UTC (rev 19200)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/simple.xhtml 2010-09-14
16:27:08 UTC (rev 19201)
@@ -1,125 +0,0 @@
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site:
http://www.fsf.org.
--->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml"
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"
-
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
xmlns:rich="http://richfaces.org/rich">
-
- <ui:composition template="/templates/template.xhtml">
-
- <ui:define name="head">
- <f:metadata>
- <f:viewParam name="templates"
value="#{templateBean.templates}">
- <f:converter converterId="templatesListConverter" />
- </f:viewParam>
- </f:metadata>
-
- <script type="text/javascript">
- var events = 0;
- var updates = 0;
- var requests = 0;
-
- function addEvent() {
- events++;
- }
- function addUpdate() {
- updates++;
- }
- function addRequest() {
- requests++;
- }
-
- function printCounts() {
- #{rich:element('events')}.innerHTML=events;
- #{rich:element('updates')}.innerHTML=updates;
- #{rich:element('requests')}.innerHTML=requests;
- }
- </script>
- </ui:define>
-
- <ui:define name="outOfTemplateBefore">
- </ui:define>
-
- <ui:define name="component">
- <a4j:queue id="queue1"/>
- <a4j:queue id="queue2"/>
-
- <h:inputText id="input1"
value="#{a4jAttachQueueBean.text1}" onkeyup="addEvent();">
- <a4j:ajax event="keyup" render="output1"
execute="@form" onbegin="addRequest();"
- oncomplete="printCounts()"
onbeforedomupdate="addUpdate()">
- <a4j:attachQueue id="a4jAttachQueue1"
-
ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
-
name="#{a4jAttachQueueBean.attributes['name'].value}"
-
onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
-
onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
-
queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
-
rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
-
requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
-
requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
-
timeout="#{a4jAttachQueueBean.attributes['timeout'].value}"/>
- </a4j:ajax>
- </h:inputText>
-
- <h:inputText id="input2"
value="#{a4jAttachQueueBean.text2}" onkeyup="addEvent();">
- <a4j:ajax event="keyup" render="output2"
execute="@form" onbegin="addRequest();"
- oncomplete="printCounts()"
onbeforedomupdate="addUpdate()">
- <a4j:attachQueue id="a4jAttachQueue2"
-
ignoreDupResponses="#{a4jAttachQueueBean.attributes2['ignoreDupResponses'].value}"
-
name="#{a4jAttachQueueBean.attributes2['name'].value}"
-
onrequestdequeue="#{a4jAttachQueueBean.attributes2['onrequestdequeue'].value}"
-
onrequestqueue="#{a4jAttachQueueBean.attributes2['onrequestqueue'].value}"
-
queueId="#{a4jAttachQueueBean.attributes2['queueId'].value}"
-
rendered="#{a4jAttachQueueBean.attributes2['rendered'].value}"
-
requestDelay="#{a4jAttachQueueBean.attributes2['requestDelay'].value}"
-
requestGroupingId="#{a4jAttachQueueBean.attributes2['requestGroupingId'].value}"
-
timeout="#{a4jAttachQueueBean.attributes2['timeout'].value}"/>
- </a4j:ajax>
- </h:inputText>
-
- <h:panelGrid columns="2">
- Output 1:
- <h:outputText id="output1"
value="#{a4jAttachQueueBean.text1}" style="font-weight:bold;"/>
- Output 2:
- <h:outputText id="output2"
value="#{a4jAttachQueueBean.text2}" style="font-weight:bold;"/>
- Events count:
- <h:outputText value="0" id="events" />
- Requests count:
- <h:outputText value="0" id="requests" />
- DOM updates count:
- <h:outputText value="0" id="updates" />
- </h:panelGrid>
-
- </ui:define>
-
- <ui:define name="outOfTemplateAfter">
- Attributes for first attach queue (first input)
- <br/>
- <metamer:attributes value="#{a4jAttachQueueBean.attributes}"
id="attributes" />
- <br/>
- Attributes for second attach queue (second input)
- <br/>
- <metamer:attributes value="#{a4jAttachQueueBean.attributes2}"
id="attributes2" />
- </ui:define>
-
- </ui:composition>
-</html>
\ No newline at end of file
Deleted:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/wrapped.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/wrapped.xhtml 2010-09-14
16:23:00 UTC (rev 19200)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/wrapped.xhtml 2010-09-14
16:27:08 UTC (rev 19201)
@@ -1,104 +0,0 @@
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site:
http://www.fsf.org.
--->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml"
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"
-
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
xmlns:rich="http://richfaces.org/rich">
-
- <ui:composition template="/templates/template.xhtml">
-
- <ui:define name="head">
- <f:metadata>
- <f:viewParam name="templates"
value="#{templateBean.templates}">
- <f:converter converterId="templatesListConverter" />
- </f:viewParam>
- </f:metadata>
-
- <script type="text/javascript">
- var events = 0;
- var updates = 0;
- var requests = 0;
-
- function addEvent() {
- events++;
- }
- function addUpdate() {
- updates++;
- }
- function addRequest() {
- requests++;
- }
-
- function printCounts() {
- #{rich:element('events')}.innerHTML=events;
- #{rich:element('updates')}.innerHTML=updates;
- #{rich:element('requests')}.innerHTML=requests;
- }
- </script>
- </ui:define>
-
- <ui:define name="outOfTemplateBefore">
- </ui:define>
-
- <ui:define name="component">
- <a4j:queue id="queue1"/>
- <a4j:queue id="queue2"/>
-
- <a4j:ajax event="keyup" render="output1, output2"
execute="@form" onbegin="addRequest();"
- oncomplete="printCounts()"
onbeforedomupdate="addUpdate()">
- <a4j:attachQueue id="a4jAttachQueue"
-
ignoreDupResponses="#{a4jAttachQueueBean.attributes['ignoreDupResponses'].value}"
-
name="#{a4jAttachQueueBean.attributes['name'].value}"
-
onrequestdequeue="#{a4jAttachQueueBean.attributes['onrequestdequeue'].value}"
-
onrequestqueue="#{a4jAttachQueueBean.attributes['onrequestqueue'].value}"
-
queueId="#{a4jAttachQueueBean.attributes['queueId'].value}"
-
rendered="#{a4jAttachQueueBean.attributes['rendered'].value}"
-
requestDelay="#{a4jAttachQueueBean.attributes['requestDelay'].value}"
-
requestGroupingId="#{a4jAttachQueueBean.attributes['requestGroupingId'].value}"
-
timeout="#{a4jAttachQueueBean.attributes['timeout'].value}"/>
-
- <h:inputText id="input1"
value="#{a4jAttachQueueBean.text1}" onkeyup="addEvent();"/>
- <h:inputText id="input2"
value="#{a4jAttachQueueBean.text2}" onkeyup="addEvent();"/>
- </a4j:ajax>
-
- <h:panelGrid columns="2">
- Output 1:
- <h:outputText id="output1"
value="#{a4jAttachQueueBean.text1}" style="font-weight:bold;"/>
- Output 2:
- <h:outputText id="output2"
value="#{a4jAttachQueueBean.text2}" style="font-weight:bold;"/>
- Events count:
- <h:outputText value="0" id="events" />
- Requests count:
- <h:outputText value="0" id="requests" />
- DOM updates count:
- <h:outputText value="0" id="updates" />
- </h:panelGrid>
-
- </ui:define>
-
- <ui:define name="outOfTemplateAfter">
- <metamer:attributes value="#{a4jAttachQueueBean.attributes}"
id="attributes" />
- </ui:define>
-
- </ui:composition>
-</html>
\ No newline at end of file