Package org.displaytag.model

Examples of org.displaytag.model.ColumnIterator


        while (rowIterator.hasNext())
        {
            Row row = rowIterator.next();

            // iterator on columns
            ColumnIterator columnIterator = row.getColumnIterator(this.model.getHeaderCellList());

            while (columnIterator.hasNext())
            {
                Column column = columnIterator.nextColumn();

                // Get the value to be displayed for the column
                Object value = column.getValue(this.decorated);

                Cell cell = getCell(ObjectUtils.toString(value));
View Full Code Here


                String stringStartRow = this.model.getTableDecorator().startRow();
                write(out, stringStartRow);
            }

            // iterator on columns
            ColumnIterator columnIterator = row.getColumnIterator(this.model.getHeaderCellList());

            write(out, ROW_START);

            while (columnIterator.hasNext())
            {
                Column column = columnIterator.nextColumn();

                // Get the value to be displayed for the column
                String value = escapeColumnValue(column.getValue(this.decorated));

                write(out, CELL_START);

                write(out, value);

                if (ALWAYS_APPEND_CELL_END || columnIterator.hasNext())
                {
                    write(out, CELL_END);
                }

            }
View Full Code Here

        while (rowIterator.hasNext())
        {
            Row row = rowIterator.next();

            // iterator on columns
            ColumnIterator columnIterator = row.getColumnIterator(this.model.getHeaderCellList());

            while (columnIterator.hasNext())
            {
                Column column = columnIterator.nextColumn();

                // Get the value to be displayed for the column
                Object value = column.getValue(this.decorated);

                PdfPCell cell = getCell(value != null ? value.toString() : StringUtils.EMPTY);
View Full Code Here

                Row row = rowIterator.next();
                HSSFRow xlsRow = getSheet().createRow(rowNum++);
                colNum = 0;

                // iterator on columns
                ColumnIterator columnIterator = row.getColumnIterator(this.model.getHeaderCellList());

                while (columnIterator.hasNext())
                {
                    Column column = columnIterator.nextColumn();

                    // Get the value to be displayed for the column
                    Object value = column.getValue(this.decorated);

                    HSSFCell cell = xlsRow.createCell(colNum++);
View Full Code Here

                currentRowValues.putAll(nextRowValues);
            }
            // handle the first pass
            else
            {
                ColumnIterator columnIterator = currentRow.getColumnIterator(model.getHeaderCellList());
                // iterator on columns
                if (log.isDebugEnabled())
                {
                    log.debug(" creating ColumnIterator on " + model.getHeaderCellList());
                }
                while (columnIterator.hasNext())
                {
                    Column column = columnIterator.nextColumn();

                    // Get the value to be displayed for the column
                    column.initialize();

                    @SuppressWarnings("deprecation")
                    String cellvalue = MediaTypeEnum.HTML.equals(model.getMedia())
                        ? column.getChoppedAndLinkedValue()
                        : ObjectUtils.toString(column.getValue(true));

                    CellStruct struct = new CellStruct(column, cellvalue);
                    currentRowValues.put(new Integer(column.getHeaderCell().getColumnNumber()), struct);
                }
            }

            nextRowValues.clear();
            // Populate the next row values
            nextRow = rowIterator.hasNext() ? rowIterator.next() : null;
            if (nextRow != null)
            {
                ColumnIterator columnIterator = nextRow.getColumnIterator(model.getHeaderCellList());
                // iterator on columns
                if (log.isDebugEnabled())
                {
                    log.debug(" creating ColumnIterator on " + model.getHeaderCellList());
                }
                while (columnIterator.hasNext())
                {
                    Column column = columnIterator.nextColumn();
                    column.initialize();
                    // Get the value to be displayed for the column

                    @SuppressWarnings("deprecation")
                    String cellvalue = MediaTypeEnum.HTML.equals(model.getMedia())
View Full Code Here

    protected Object getTotalForList(List<Row> window, int columnNumber)
    {
        Object total = null;
        for (Row row : window)
        {
            ColumnIterator columnIterator = row.getColumnIterator(tableModel.getHeaderCellList());
            while (columnIterator.hasNext())
            {
                Column column = columnIterator.nextColumn();
                if (column.getHeaderCell().getColumnNumber() == columnNumber)
                {
                    Object value = null;
                    try
                    {
View Full Code Here

    protected String getCellValue(int columnNumber, int rowNumber)
    {
        List<Row> fullList = tableModel.getRowListFull();
        Row row = fullList.get(rowNumber);
        ColumnIterator columnIterator = row.getColumnIterator(tableModel.getHeaderCellList());
        while (columnIterator.hasNext())
        {
            Column column = columnIterator.nextColumn();
            if (column.getHeaderCell().getColumnNumber() == columnNumber)
            {
                try
                {
                    column.initialize();
View Full Code Here

        List<Row> window = fullList.subList(startRow, stopRow + 1);
        Object total = null;
        for (Iterator<Row> iterator = window.iterator(); iterator.hasNext();)
        {
            Row row = iterator.next();
            ColumnIterator columnIterator = row.getColumnIterator(tableModel.getHeaderCellList());
            while (columnIterator.hasNext())
            {
                Column column = columnIterator.nextColumn();
                if (column.getHeaderCell().getColumnNumber() == columnNumber)
                {
                    Object value = null;
                    try
                    {
View Full Code Here

                String stringStartRow = this.model.getTableDecorator().startRow();
                write(out, stringStartRow);
            }

            // iterator on columns
            ColumnIterator columnIterator = row.getColumnIterator(this.model.getHeaderCellList());

            write(out, ROW_START);

            while (columnIterator.hasNext())
            {
                Column column = columnIterator.nextColumn();

                // Get the value to be displayed for the column
                String value = escapeColumnValue(column.getValue(this.decorated));

                write(out, CELL_START);

                write(out, value);

                if (ALWAYS_APPEND_CELL_END || columnIterator.hasNext())
                {
                    write(out, CELL_END);
                }

            }
View Full Code Here

                currentRowValues.putAll(nextRowValues);
            }
            // handle the first pass
            else
            {
                ColumnIterator columnIterator = currentRow.getColumnIterator(model.getHeaderCellList());
                // iterator on columns
                if (log.isDebugEnabled())
                {
                    log.debug(" creating ColumnIterator on " + model.getHeaderCellList());
                }
                while (columnIterator.hasNext())
                {
                    Column column = columnIterator.nextColumn();

                    // Get the value to be displayed for the column
                    column.initialize();
                    CellStruct struct = new CellStruct(column, column.getChoppedAndLinkedValue());
                    currentRowValues.put(new Integer(column.getHeaderCell().getColumnNumber()), struct);
                }
            }

            nextRowValues.clear();
            // Populate the next row values
            nextRow = rowIterator.hasNext() ? rowIterator.next() : null;
            if (nextRow != null)
            {
                ColumnIterator columnIterator = nextRow.getColumnIterator(model.getHeaderCellList());
                // iterator on columns
                if (log.isDebugEnabled())
                {
                    log.debug(" creating ColumnIterator on " + model.getHeaderCellList());
                }
                while (columnIterator.hasNext())
                {
                    Column column = columnIterator.nextColumn();
                    column.initialize();
                    // Get the value to be displayed for the column
                    CellStruct struct = new CellStruct(column, column.getChoppedAndLinkedValue());
                    nextRowValues.put(new Integer(column.getHeaderCell().getColumnNumber()), struct);
                }
View Full Code Here

TOP

Related Classes of org.displaytag.model.ColumnIterator

Copyright © 2018 www.massapicom. 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.