[richfaces-svn-commits] JBoss Rich Faces SVN: r18493 - in root/tests/metamer/trunk/application/src/main/webapp: templates and 1 other directory.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Aug 6 05:15:03 EDT 2010
Author: ppitonak at redhat.com
Date: 2010-08-06 05:15:02 -0400 (Fri, 06 Aug 2010)
New Revision: 18493
Modified:
root/tests/metamer/trunk/application/src/main/webapp/resources/script/common.js
root/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
Log:
* added logging executed JSF phases into a4j:log
Modified: root/tests/metamer/trunk/application/src/main/webapp/resources/script/common.js
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/resources/script/common.js 2010-08-06 06:34:22 UTC (rev 18492)
+++ root/tests/metamer/trunk/application/src/main/webapp/resources/script/common.js 2010-08-06 09:15:02 UTC (rev 18493)
@@ -69,4 +69,14 @@
}
}
+/**
+ * Logs information about JSF lifecycle and invoked action/action listeners to the a4j:log.
+ */
+function updateLog(data) {
+ var logEntries = data.replace("[", "").replace("]", "").split(",");
+ for (index in logEntries) {
+ RichFaces.log.debug(logEntries[index]);
+ }
+}
+
Modified: root/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2010-08-06 06:34:22 UTC (rev 18492)
+++ root/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2010-08-06 09:15:02 UTC (rev 18493)
@@ -36,15 +36,17 @@
<h:panelGrid columns="2" width="230px">
<h:outputText id="a4jLogLabel" value="Display log" />
-
+
<h:selectBooleanCheckbox id="a4jLogCheckbox" value="false" onchange="showOrHideLog()"/>
<h:outputText id="a4jStatusLabel" value="Status" />
- <a4j:status id="a4jStatus">
- <f:facet name="start">
- <h:outputText value="WORKING" style="color: red;" />
- </f:facet>
- </a4j:status>
+ <a4j:outputPanel ajaxRendered="true">
+ <a4j:status id="a4jStatus" onstop="updateLog('#{phasesBean.phases}')">
+ <f:facet name="start">
+ <h:outputText value="WORKING" style="color: red;" />
+ </f:facet>
+ </a4j:status>
+ </a4j:outputPanel>
<h:outputText id="showUiDebugLabel" value="Show ui:debug" />
<h:outputText id="showUiDebug" value="Ctrl+Shift+L" />
@@ -94,7 +96,7 @@
<h:outputText id="requestTime" value="#{phasesBean.date}">
<f:convertDateTime pattern="HH:mm:ss.SSS"/>
</h:outputText>
- <ul>
+ <ul class="phases-list">
<a4j:repeat value="#{phasesBean.phases}" var="phase">
<li>#{phase}</li>
</a4j:repeat>
More information about the richfaces-svn-commits
mailing list