Blame | Last modification | View Log | Download | RSS feed
#*
* $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*#
<script type="text/javascript">
<!--
function toggleDebug(debugId) {
var debugDiv = document.getElementById(debugId);
if (debugDiv) {
var display = debugDiv.style.display;
if (display == 'none') {
debugDiv.style.display = 'block';
} else if (display == 'block') {
debugDiv.style.display = 'none';
}
}
}
-->
</script>
<p />
#set ($id = $parameters.id)
#if ($id) #else #set ($id = 'debug') #end
<a href="#" onclick="toggleDebug('$id');return false;">[Debug]</a>
<div style="display:none" id="$id">
<h2>Struts ValueStack Debug</h2>
<p />
#set($contextMap = $stack.context)
<h3>Value Stack Contents</h3>
#set ($stackContents = $parameters.stackValues)
<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#DDDDDD">
<tr><th>Object</th><th>Property Name</th><th>Property Value</th></tr>
#set ($index = 1)
#foreach ($stackObject in $stackContents)
<tr>
<td rowspan="$stackObject.value.size()">$stackObject.key</td>
#set ($renderRow = false)
#set ($propertyMap = $stackObject.value)
#foreach ($propertyName in $propertyMap.keySet())
#if ($renderRow == true)<tr>#else #set ($renderRow = true) #end
<td bgcolor="#if (($index % 2) == 0)#BBBBBB#else#CCCCCC#end">$propertyName</td>
<td bgcolor="#if (($index % 2) == 0)#BBBBBB#else#CCCCCC#end">$propertyMap.get($propertyName)</td>
</tr>
#set ($index = $index + 1)
#end
#end
</table>
<h3>Stack Context</h3>
<i>These items are available using the #key notation</i>
<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#DDDDDD">
<tr>
<th>Key</th><th>Value</th>
</tr>
#set ($index = 1)
#foreach ($contextKey in $contextMap.keySet())
<tr bgcolor="#if (($index % 2) == 0)#BBBBBB#else#CCCCCC#end">
<td>$contextKey</td><td>$contextMap.get($contextKey)</td>
</tr>
#set ($index = $index + 1)
#end
</table>
<p />
</div>