Author: lfryc(a)redhat.com
Date: 2010-10-06 09:01:14 -0400 (Wed, 06 Oct 2010)
New Revision: 19476
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml
Log:
fixed and described samples for a4j:attachQueue which did not work due to RF-9351
(RFPL-734)
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml 2010-10-06
11:56:27 UTC (rev 19475)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/extending.xhtml 2010-10-06
13:01:14 UTC (rev 19476)
@@ -41,11 +41,9 @@
}
function updateDifferenceTime() {
- var eventTime1 =
parseInt(jQuery(#{rich:element('eventTime1:outputTime')}).attr('title'));
- var eventTime2 =
parseInt(jQuery(#{rich:element('eventTime2:outputTime')}).attr('title'));
+ var eventTime =
parseInt(jQuery(#{rich:element('eventTime: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>
@@ -67,23 +65,31 @@
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}"/>
+ <fieldset>
+ <legend><a4j:ajax event="keyup" ></legend>
+
+ <a4j:ajax event="keyup" render="output1, output2"
execute="@form" onbegin="add(#{rich:element('requests')});
refresh(#{rich:element('beginTime:outputTime')}); "
+
oncomplete="refresh(#{rich:element('completeTime:outputTime')});
updateDifferenceTime();"
onbeforedomupdate="add(#{rich:element('updates')});">
+
+ <div><a4j:attachQueue /></div>
+
+ <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')});
refresh(#{rich:element('eventTime:outputTime')});"/>
+ <h:inputText id="input2"
value="#{a4jAttachQueueBean.text2}"
onkeyup="add(#{rich:element('events')});
refresh(#{rich:element('eventTime:outputTime')});"/>
+ </a4j:ajax>
+
+ </fieldset>
- <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;"/>
@@ -98,8 +104,16 @@
Difference time:
<h:outputText value="" id="differenceTime" />
</h:panelGrid>
-
+
+ <h:panelGrid columns="1">
+ <metamer:clientTime id="eventTime" label="Event
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 wrapping attach queue
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-10-06
11:56:27 UTC (rev 19475)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/list.xhtml 2010-10-06
13:01:14 UTC (rev 19476)
@@ -38,15 +38,12 @@
</metamer:testPageLink>
<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>
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml 2010-10-06
11:56:27 UTC (rev 19475)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAttachQueue/nestedExtension.xhtml 2010-10-06
13:01:14 UTC (rev 19476)
@@ -67,53 +67,70 @@
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(); ">
+ <fieldset>
+ <legend><a4j:ajax event='click' ... ></legend>
+
+ <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(); ">
+
+ <div><a4j:attachQueue id="..1" /></div>
+
+ <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"
/>
+
+ <fieldset>
+ <legend><a4j:ajax event='valueChange' ...
></legend>
+
+ <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}"
+ onclick="add(#{rich:element('events1')});
refresh(#{rich:element('eventTime1:outputTime')}); "
+ onchange="add(#{rich:element('events2')});
refresh(#{rich:element('eventTime2:outputTime')}); " />
+ <a4j:commandButton
+ id="a4jCommandButton2" value="First button"
+ onclick="add(#{rich:element('events1')});
refresh(#{rich:element('eventTime1:outputTime')}); " />
+
+ <div><a4j:attachQueue id="..2" /></div>
+
+ <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>
+
+ </fieldset>
+
+ </a4j:ajax>
+
+ </fieldset>
- <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;" />
Show replies by date