Subversion Repositories Sigmater

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 Andrea 1
#*
2
 * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
3
 *
4
 * Licensed to the Apache Software Foundation (ASF) under one
5
 * or more contributor license agreements.  See the NOTICE file
6
 * distributed with this work for additional information
7
 * regarding copyright ownership.  The ASF licenses this file
8
 * to you under the Apache License, Version 2.0 (the
9
 * "License"); you may not use this file except in compliance
10
 * with the License.  You may obtain a copy of the License at
11
 *
12
 *  http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing,
15
 * software distributed under the License is distributed on an
16
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
 * KIND, either express or implied.  See the License for the
18
 * specific language governing permissions and limitations
19
 * under the License.
20
 *#
21
<script type="text/javascript">
22
<!--
23
    function toggleDebug(debugId) {
24
        var debugDiv = document.getElementById(debugId);
25
        if (debugDiv) {
26
            var display = debugDiv.style.display;
27
            if (display == 'none') {
28
                debugDiv.style.display = 'block';
29
            } else if (display == 'block') {
30
                debugDiv.style.display = 'none';
31
            }
32
        }
33
    }
34
-->
35
</script>
36
<p />
37
 
38
#set ($id = $parameters.id)
39
#if ($id) #else #set ($id = 'debug') #end
40
<a href="#" onclick="toggleDebug('$id');return false;">[Debug]</a>
41
<div style="display:none" id="$id">
42
<h2>Struts ValueStack Debug</h2>
43
<p />
44
 
45
#set($contextMap = $stack.context)
46
 
47
<h3>Value Stack Contents</h3>
48
#set ($stackContents = $parameters.stackValues)
49
<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#DDDDDD">
50
    <tr><th>Object</th><th>Property Name</th><th>Property Value</th></tr>
51
 
52
    #set ($index = 1)
53
    #foreach ($stackObject in $stackContents)
54
    <tr>
55
        <td rowspan="$stackObject.value.size()">$stackObject.key</td>
56
        #set ($renderRow = false)
57
        #set ($propertyMap = $stackObject.value)
58
        #foreach ($propertyName in $propertyMap.keySet())
59
            #if ($renderRow == true)<tr>#else #set ($renderRow = true) #end
60
        <td bgcolor="#if (($index % 2) == 0)#BBBBBB#else#CCCCCC#end">$propertyName</td>
61
        <td bgcolor="#if (($index % 2) == 0)#BBBBBB#else#CCCCCC#end">$propertyMap.get($propertyName)</td>
62
    </tr>
63
            #set ($index = $index + 1)
64
        #end
65
    #end
66
</table>
67
 
68
<h3>Stack Context</h3>
69
<i>These items are available using the #key notation</i>
70
<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#DDDDDD">
71
    <tr>
72
        <th>Key</th><th>Value</th>
73
    </tr>
74
 
75
    #set ($index = 1)
76
    #foreach ($contextKey in $contextMap.keySet())
77
    <tr bgcolor="#if (($index % 2) == 0)#BBBBBB#else#CCCCCC#end">
78
        <td>$contextKey</td><td>$contextMap.get($contextKey)</td>
79
    </tr>
80
    #set ($index = $index + 1)
81
    #end
82
</table>
83
<p />
84
 
85
</div>