Package org.displaytag.export

Examples of org.displaytag.export.XmlTotalsWriter.writeTable()


        TableModel m = getModel();
        TableTotaler tt = new TableTotaler();
        m.setTotaler(tt);
        tt.init(m);
        XmlTotalsWriter tw = new XmlTotalsWriter(m);
        tw.writeTable(m, "safd");
        String xml = tw.getXml();
        assertXpathEvaluatesTo("11.0", "//subgroup[@grouped-by=0]/subtotal/subtotal-cell[4]", xml);
        assertXpathEvaluatesTo("7.0", "//subgroup[@grouped-by=1]/subtotal/subtotal-cell[4]", xml);
        assertXpathEvaluatesTo("4.0", "//subgroup[@grouped-by=2]/subtotal/subtotal-cell[4]", xml);
        assertXpathExists("//cell[@text-align='right']", xml);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.