You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by an...@apache.org on 2006/08/01 04:34:01 UTC
svn commit: r427409 - in
/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry:
html/ExceptionDisplay.html html/RequestDisplay.html pages/Exception.html
Author: andyhot
Date: Mon Jul 31 19:34:00 2006
New Revision: 427409
URL: http://svn.apache.org/viewvc?rev=427409&view=rev
Log:
Allow exceptions to be shown on javascript-disabled clients - use js instead of css to initially hide content
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/ExceptionDisplay.html
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/RequestDisplay.html
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/pages/Exception.html
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/ExceptionDisplay.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/ExceptionDisplay.html?rev=427409&r1=427408&r2=427409&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/ExceptionDisplay.html (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/ExceptionDisplay.html Mon Jul 31 19:34:00 2006
@@ -11,7 +11,7 @@
onClick="ognl:'return toggleDisplay(\'excdisplay'+index+'\')'">[ +/- ] Exception:</a>
<span jwcid="@Insert" value="ognl:exception.message">A message describing the exception.</span>
- <div jwcid="@Any" id="ognl:'excdisplay' + index" style="display:none;">
+ <div jwcid="@Any" id="ognl:'excdisplay' + index" class="toggleContent">
<table class="exception-display">
<tr class="exception-name">
<td colspan="2"><span jwcid="insertClass">some.exception.Class</span></td>
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/RequestDisplay.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/RequestDisplay.html?rev=427409&r1=427408&r2=427409&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/RequestDisplay.html (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/RequestDisplay.html Mon Jul 31 19:34:00 2006
@@ -1,14 +1,14 @@
<span jwcid="$content$">
<a href="" class="toggle"
onClick="return toggleDisplay('requestDisplay')">[ +/- ] Request</a>
-<div id="requestDisplay" style="display:none">
+<div id="requestDisplay" class="toggleContent">
<span jwcid="@Describe" object="ognl:request"/>
</div>
<span jwcid="@If" condition="ognl:request.getSession(false) != null">
<a href="" class="toggle"
onClick="return toggleDisplay('sessionDisplay')">[ +/- ] Session</a>
-<div id="sessionDisplay" style="display:none;">
+<div id="sessionDisplay" class="toggleContent">
<span jwcid="@Describe" object="ognl:request.getSession(false)"/>
</div>
</span>
@@ -16,22 +16,21 @@
<br/>
<a href="" class="toggle"
onClick="return toggleDisplay('contextDisplay')">[ +/- ] Context</a>
-<div id="contextDisplay" style="display:none;">
+<div id="contextDisplay" class="toggleContent">
<span jwcid="@Describe" object="ognl:activator"/>
<span jwcid="@Describe" object="ognl:context"/>
</div>
-
<br/>
<a href="" class="toggle"
onClick="return toggleDisplay('statusDisplay')">[ +/- ] Status</a>
-<div id="statusDisplay" style="display:none;">
+<div id="statusDisplay" class="toggleContent">
<span jwcid="@Delegator" delegate="ognl:reportStatusRenderer"/>
</div>
<br/>
<a href="" class="toggle"
onClick="return toggleDisplay('sysPropDisplay')">[ +/- ] System Properties</a>
-<div id="sysPropDisplay" style="display:none;">
+<div id="sysPropDisplay" class="toggleContent">
<span jwcid="@Delegator" delegate="ognl:systemPropertiesRenderer"/>
</div>
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/pages/Exception.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/pages/Exception.html?rev=427409&r1=427408&r2=427409&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/pages/Exception.html (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/pages/Exception.html Mon Jul 31 19:34:00 2006
@@ -33,7 +33,12 @@
function toggleDisplay(id){
dojo.style.toggleShowing(dojo.byId(id));
return false;
-}
+}
+
+dojo.lang.forEach(
+ dojo.html.getElementsByClass('toggleContent'),
+ function(item) {toggleDisplay(item.id);}
+ );
</script>
</body>