Package org.apache.empire.struts2.html

Examples of org.apache.empire.struts2.html.HtmlWriter.startTag()


        if (options!=null)
        {   // Render option list
            Object current = getValue();
            if (getBoolean(allownull, false) && options.contains(null)==false)
            {   // add an empty entry
                HtmlTag option = w.startTag("option");
                option.addAttributeNoCheck("value", "", false);
                option.addAttribute("selected", ObjectUtils.isEmpty(current));
                option.beginBody("");
                option.endTag(true);
            }
View Full Code Here


            for (OptionEntry entry : options)
            {
                Object value = entry.getValue();
                boolean isCurrent = ObjectUtils.compareEqual(current, value);
                // Add Option entry
                HtmlTag option = w.startTag("option");
                option.addAttributeNoCheck("value", value, true);
                option.addAttribute("selected", isCurrent);
                option.beginBody(getTranslation(entry.getText()));
                option.endTag(true);
            }
View Full Code Here

    public int doStartTag()
        throws JspException
    {
        // Tabel cell tag
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag rb = w.startTag("input");
        addStandardAttributes(rb, null);
        rb.addAttribute("type", "radio");
        rb.addAttribute("name",  getTagName(name));
        rb.addAttributeNoCheck("value", getStringValue(), true);
        rb.addAttribute("checked", getChecked());
View Full Code Here

            HtmlWriter htmlWriter = new HtmlWriter(writer);

            // render form Tag?
            if (readOnly==false)
            {
                formTag = htmlWriter.startTag("form");
                formTag.addAttribute("id",       this.getId());
                formTag.addAttribute("name",     this.name);
                formTag.addAttribute("onsubmit", this.onsubmit);
                formTag.addAttribute("action",   getURL(action));
                formTag.addAttribute("method",   this.method);
View Full Code Here

            // The Anchors
            if (disabled==false)
            {
                String url = getUrl(action);

                HtmlTag a = htmlWriter.startTag("a");
                a.addAttribute("id",       this.getId());
                a.addAttribute("href",     url);
                a.addAttribute("target",   this.targets);
                a.addAttribute("class",    this.cssClass);
                a.addAttribute("style",    this.cssStyle);
View Full Code Here

                if (disabledTag == null)
                    disabledTag = dic.AnchorDisabledTag();
                if (cssClass ==null)
                    cssClass = dic.AnchorDisabledClass();
                // The value
                HtmlTag s = htmlWriter.startTag(disabledTag);
                s.addAttribute("class",    this.cssClass);
                s.addAttribute("style",    this.cssStyle);
                s.beginBody(text);
                s.endTag(body);
            }
View Full Code Here

        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        // Wrap button like an input control
        if (getBoolean(embed, false))
        {
            // the wrapper (only if renderLabel && renderControl are both true)
            HtmlTag wrapper = w.startTag( dic.InputWrapperTag());
            wrapper.addAttribute("class", dic.InputWrapperClass());
            wrapper.beginBody(true);
           
            HtmlTag wrapCtrl = w.startTag( dic.SubmitControlTag());
            wrapCtrl.addAttribute("class", dic.SubmitControlClass());
View Full Code Here

            // the wrapper (only if renderLabel && renderControl are both true)
            HtmlTag wrapper = w.startTag( dic.InputWrapperTag());
            wrapper.addAttribute("class", dic.InputWrapperClass());
            wrapper.beginBody(true);
           
            HtmlTag wrapCtrl = w.startTag( dic.SubmitControlTag());
            wrapCtrl.addAttribute("class", dic.SubmitControlClass());
            wrapCtrl.addAttributes(dic.SubmitControlAttributes());
            wrapCtrl.beginBody();
        }
        // Button
View Full Code Here

    {
        // Get Row Info
        TableRowTag.RowInfo ri = getRowInfo();
        // Start Tag
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag td = w.startTag("td");
        td.addAttribute("id", getId());
        td.addAttribute("class", getCssClass(ri));
        setStyleAndWrap(td, ri);
        td.addAttribute("width", width);
        td.addAttribute("height", height);
View Full Code Here

        try
        { // No Value

            // Render value
            HtmlWriter htmlWriter = new HtmlWriter(writer);
            HtmlTag table = htmlWriter.startTag("table");
            table.addAttribute("id", this.id);
            table.addAttribute("class", this.cssClass);
            table.addAttribute("style", this.cssStyle);
            table.addAttribute("cellpadding", this.cellpadding);
            table.addAttribute("cellspacing", this.cellspacing);
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.