Subversion Repositories Sigmater

Rev

Details | Last modification | View Log | RSS feed

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