Author: lfryc(a)redhat.com
Date: 2010-07-10 15:38:11 -0400 (Sat, 10 Jul 2010)
New Revision: 17859
Modified:
root/tests/metamer/trunk/src/main/webapp/components/a4jPush/simple.xhtml
Log:
extended output for a4j:push - time since epoch + client side output
Modified: root/tests/metamer/trunk/src/main/webapp/components/a4jPush/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jPush/simple.xhtml 2010-07-10
19:37:46 UTC (rev 17858)
+++ root/tests/metamer/trunk/src/main/webapp/components/a4jPush/simple.xhtml 2010-07-10
19:38:11 UTC (rev 17859)
@@ -12,17 +12,35 @@
</f:viewParam>
</f:metadata>
<h:outputStylesheet library="css"
name="a4jPush.css"/>
+ <h:outputScript library="script" name="date-format.js"
/>
</ui:define>
<ui:define name="outOfTemplateBefore">
</ui:define>
<ui:define name="component">
+
+ <h:panelGroup id="time">
+ <h:outputText value="Server: " />
+ <h:outputText id="serverDate"
value="#{a4jPushBean.date}" title="#{a4jPushBean.date.time}">
+ <f:convertDateTime pattern="dd.MM.yyyy HH:mm:ss.SSS" />
+ </h:outputText>
+ ***
+ <h:outputText value="Client: " />
+ <h:outputText id="clientDate" value=""
title="" />
+ <script type="text/javascript">
+ //<![CDATA[
+ var now = new Date();
+ jQuery("div.content span[id$=clientDate]")
+ .text(now.format("dd.mm.yyyy HH:MM:ss.l", false))
+ .attr("title", now.getTime());
+ //]]>
+ </script>
+ ***
+ <h:outputText value="Counter: " />
+ <h:outputText id="outputCounter"
value="#{a4jPushBean.counter}"/>
+ </h:panelGroup>
- <h:outputText id="outputDate"
value="#{a4jPushBean.date}"/>
- ***
- <h:outputText id="outputCounter"
value="#{a4jPushBean.counter}"/>
-
<a4j:push id="push"
action="#{a4jPushBean.attributes.action}"
actionListener="#{a4jPushBean.attributes.actionListener}"
@@ -39,7 +57,7 @@
rendered="#{a4jPushBean.attributes['rendered'].value}"
value="#{a4jPushBean.attributes['value'].value}"
- <a4j:ajax render="outputDate,
outputCounter" />
+ <a4j:ajax render="time" />
<f:param name="testParam" value="testValue" />
<f:param name="testParam1" value="testValue1"
/>
</a4j:push>