Package org.displaytag.util

Examples of org.displaytag.util.MultipleHtmlAttribute


        Object classAttributes = this.headerAttributes.get(TagConstants.ATTRIBUTE_CLASS);

        // handle multiple values
        if (classAttributes == null)
        {
            this.headerAttributes.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute(cssClass));
        }
        else
        {
            ((MultipleHtmlAttribute) classAttributes).addAttributeValue(cssClass);
        }
View Full Code Here


                    xml.append("=\"");
                    xml.append(m.group(2));
                    xml.append("\" ");
                }
            }
            MultipleHtmlAttribute cssClass = (MultipleHtmlAttribute)atts.get(TagConstants.ATTRIBUTE_CLASS);
            if (cssClass != null && !cssClass.isEmpty())
            {
                xml.append(" class");
                xml.append("=\"");
                xml.append(cssClass.toString());
                xml.append("\"");
            }
        }

    }
View Full Code Here

     * setter for the "class" html attribute.
     * @param value attribute value
     */
    public void setClass(String value)
    {
        this.attributeMap.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute(value));
    }
View Full Code Here

     * setter for the "class" html attribute.
     * @param value attribute value
     */
    public void setClass(String value)
    {
        this.attributeMap.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute(value));
    }
View Full Code Here

    {
        Object classAttributes = this.attributeMap.get(TagConstants.ATTRIBUTE_CLASS);

        if (classAttributes == null)
        {
            this.attributeMap.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute(value));
        }
        else
        {
            ((MultipleHtmlAttribute) classAttributes).addAttributeValue(value);
        }
View Full Code Here

     * setter for the "class" tag attribute.
     * @param value attribute value
     */
    public void setClass(String value)
    {
        this.attributeMap.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute(value));
    }
View Full Code Here

     * setter for the "headerClass" tag attribute.
     * @param value attribute value
     */
    public void setHeaderClass(String value)
    {
        this.headerAttributeMap.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute(value));
    }
View Full Code Here

            hb.setTitle("long");
            hb.setBeanPropertyName("camel");
            hb.setTotaled(false);
            HtmlAttributeMap mm = new HtmlAttributeMap();
            mm.put(TagConstants.ATTRIBUTE_STYLE, "font-weight: bold; text-align: right");
            mm.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute("right rowish"));
            hb.setHtmlAttributes(mm);
            model.addColumnHeader(hb);
        }
        {
            HeaderCell hb = new HeaderCell();
View Full Code Here

            hb.setTitle("long");
            hb.setBeanPropertyName("camel");
            hb.setTotaled(false);
            HtmlAttributeMap mm = new HtmlAttributeMap();
            mm.put(TagConstants.ATTRIBUTE_STYLE, "font-weight: bold; text-align: right");
            mm.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute("right rowish"));
            hb.setHtmlAttributes(mm);
            model.addColumnHeader(hb);
        }
        {
            HeaderCell hb = new HeaderCell();
View Full Code Here

     */
    public String getOpenTag()
    {
        Map<String, Object> rowAttributes = new HtmlAttributeMap();

        MultipleHtmlAttribute cssAttribute = new MultipleHtmlAttribute(this.tableModel.getProperties().getCssRow(
            this.rowNumber));

        if (this.tableModel.getTableDecorator() != null)
        {
            try
            {
                String addStyle = this.tableModel.getTableDecorator().addRowClass();

                if (StringUtils.isNotBlank(addStyle))
                {
                    cssAttribute.addAttributeValue(addStyle);
                }

                String id = this.tableModel.getTableDecorator().addRowId();
                if (StringUtils.isNotBlank(id))
                {
                    rowAttributes.put(TagConstants.ATTRIBUTE_ID, id);
                }
            }
            catch (NoSuchMethodError e)
            {
                // this catch is here to allow decorators compiled with displaytag 1.0 work with 1.1
                // since the addRowClass() and addRowId() are new in displaytag 1.1 earlier decorators could throw
                // a NoSuchMethodError... be nice with them till a next major release
            }
        }

        if (!cssAttribute.isEmpty())
        {
            rowAttributes.put(TagConstants.ATTRIBUTE_CLASS, cssAttribute);
        }

        StringBuffer tag = new StringBuffer();
View Full Code Here

TOP

Related Classes of org.displaytag.util.MultipleHtmlAttribute

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.