Author: jjamrich
Date: 2012-01-18 03:41:39 -0500 (Wed, 18 Jan 2012)
New Revision: 23159
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jPush/simple.xhtml
Log:
RFPL-982: Rename client push script and update behavior
Client library handling push events renamed to avoid name collision (push.js is default
push library script name).
Behavior change: values from push event now replace previous value instead of add new item
in list.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jPush/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jPush/simple.xhtml 2012-01-18
08:41:30 UTC (rev 23158)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jPush/simple.xhtml 2012-01-18
08:41:39 UTC (rev 23159)
@@ -36,19 +36,32 @@
</f:viewParam>
</f:metadata>
</ui:define>
-
+
<ui:define name="head">
- <h:outputScript library="script" name="push.js"/>
+ <h:outputScript library="script"
name="pushHelper.js"/>
</ui:define>
<ui:define name="component">
-
- <ul class="push-list"></ul>
-
+
<a4j:push address="xxx@pushTopicsContext"
onerror="alert('Error: ' + event.rf.data)"
- ondataavailable="updateList(event.rf.data)" >
+
ondataavailable="updateMessage(#{rich:element('messagePanel')},
event.rf.data);" >
</a4j:push>
+ <p>To send your own message to Topics Context, open page
+ <h:commandLink value="Message Producer"
action="messageProducer" />
+ </p>
+
+ <h:panelGrid columns="2">
+ <h:outputLabel value="Last message:" />
+ <a4j:outputPanel id="messagePanel"
layout="block">
+ <div>
+ <i>waiting for data from server...</i>
+ </div>
+ </a4j:outputPanel>
+ </h:panelGrid>
+
+
+
</ui:define>
<ui:define name="outOfTemplateAfter">
Show replies by date