Package org.displaytag.model

Examples of org.displaytag.model.Cell


     * ToString() test.
     */
    @Test
    public void testCell()
    {
        checkToString(new Cell(null));
    }
View Full Code Here


        if (!tableTag.isIncludedRow())
        {
            return super.doEndTag();
        }

        Cell cell = null;
        if (this.property == null && this.value != null)
        {
            cell = new Cell(value);
        }
        else if (this.property == null && this.bodyContent != null)
        {
            cell = new Cell(this.bodyContent.getString());
        }

        Object rowStyle = this.attributeMap.get(TagConstants.ATTRIBUTE_STYLE);
        Object rowClass = this.attributeMap.get(TagConstants.ATTRIBUTE_CLASS);
        if (rowStyle != null || rowClass != null)
        {
            HtmlAttributeMap perRowValues = new HtmlAttributeMap();
            if (rowStyle != null)
            {
                perRowValues.put(TagConstants.ATTRIBUTE_STYLE, rowStyle);
            }
            if (rowClass != null)
            {
                perRowValues.put(TagConstants.ATTRIBUTE_CLASS, rowClass);
            }
            if (cell == null)
            {
                cell = new Cell(null);
            }
            cell.setPerRowAttributes(perRowValues);
        }

        tableTag.addCell(cell != null ? cell : Cell.EMPTY_CELL);

        // cleanup non-attribute variables
View Full Code Here

        if (!tableTag.isIncludedRow())
        {
            return super.doEndTag();
        }

        Cell cell = null;
        if (this.property == null && this.value != null)
        {
            cell = new Cell(value);
        }
        else if (this.property == null && this.bodyContent != null)
        {
            cell = new Cell(this.bodyContent.getString());
        }

        Object rowStyle = this.attributeMap.get(TagConstants.ATTRIBUTE_STYLE);
        Object rowClass = this.attributeMap.get(TagConstants.ATTRIBUTE_CLASS);
        if (rowStyle != null || rowClass != null)
        {
            HtmlAttributeMap perRowValues = new HtmlAttributeMap();
            if (rowStyle != null)
            {
                perRowValues.put(TagConstants.ATTRIBUTE_STYLE, rowStyle);
            }
            if (rowClass != null)
            {
                perRowValues.put(TagConstants.ATTRIBUTE_CLASS, rowClass);
            }
            if (cell == null)
            {
                cell = new Cell(null);
            }
            cell.setPerRowAttributes(perRowValues);
        }

        tableTag.addCell(cell != null ? cell : Cell.EMPTY_CELL);

        // cleanup non-attribute variables
View Full Code Here

        if (tableTag.isFirstIteration())
        {
            addHeaderToTable(tableTag);
        }

        Cell cell;

        if (this.property == null)
        {

            Object cellValue;

            if (this.bodyContent != null)
            {
                String value = this.bodyContent.getString();

                if (value == null && this.nulls)
                {
                    value = "";
                }

                cellValue = value;
            }
            // BodyContent will be null if the body was not eval'd, eg an empty list.
            else if (tableTag.isEmpty())
            {
                cellValue = Cell.EMPTY_CELL;
            }
            else
            {
                throw new MissingAttributeException(getClass(), new String[]{
                    "property attribute",
                    "value attribute",
                    "tag body"});
            }
            cell = new Cell(cellValue);

        }
        else
        {
            cell = Cell.EMPTY_CELL;
View Full Code Here

        if (!tableTag.isIncludedRow())
        {
            return super.doEndTag();
        }

        Cell cell = null;
        if (this.property == null && this.value != null)
        {
            cell = new Cell(value);
        }
        else if (this.property == null && this.bodyContent != null)
        {
            cell = new Cell(this.bodyContent.getString());
        }

        Object rowStyle = this.attributeMap.get(TagConstants.ATTRIBUTE_STYLE);
        Object rowClass = this.attributeMap.get(TagConstants.ATTRIBUTE_CLASS);
        if (rowStyle != null || rowClass != null)
        {
            HtmlAttributeMap perRowValues = new HtmlAttributeMap();
            if (rowStyle != null)
            {
                perRowValues.put(TagConstants.ATTRIBUTE_STYLE, rowStyle);
            }
            if (rowClass != null)
            {
                perRowValues.put(TagConstants.ATTRIBUTE_CLASS, rowClass);
            }
            if (cell == null)
            {
                cell = new Cell(null);
            }
            cell.setPerRowAttributes(perRowValues);
        }

        tableTag.addCell(cell != null ? cell : Cell.EMPTY_CELL);

        // cleanup non-attribute variables
View Full Code Here

TOP

Related Classes of org.displaytag.model.Cell

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.