FileDocCategorySizeDatePackage
Debug.javaAPI DocExample3125Mon Jul 23 13:26:36 BST 2007org.apache.struts2.components

Debug

public class Debug extends UIBean

Fields Summary
public static final String
TEMPLATE
Constructors Summary
public Debug(com.opensymphony.xwork2.util.ValueStack stack, HttpServletRequest request, HttpServletResponse response)


           
        super(stack, request, response);
    
Methods Summary
protected java.lang.StringgetDefaultTemplate()

        return TEMPLATE;
    
public booleanstart(java.io.Writer writer)

        boolean result = super.start(writer);

        ValueStack stack = getStack();
        Iterator iter = stack.getRoot().iterator();
        List stackValues = new ArrayList(stack.getRoot().size());
        while (iter.hasNext()) {
            Object o = iter.next();
            Map values;
            try {
                values = OgnlUtil.getBeanMap(o);
            } catch (Exception e) {
                throw new StrutsException("Caught an exception while getting the property values of " + o, e);
            }
            stackValues.add(new DebugMapEntry(o.getClass().getName(), values));
        }

        addParameter("stackValues", stackValues);

        return result;