Examples of HtmlWriter


Examples of org.apache.empire.struts2.html.HtmlWriter

        // evaluateParams();
        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);

Examples of org.apache.empire.struts2.html.HtmlWriter

   
    @Override
    public int doStartTag() throws JspException
    {
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
       
        HtmlTag div = w.startTag(dic.PageInfoTag());
        addStandardAttributes(div, dic.PageInfoClass());
        div.beginBody();
        // Add Label
        w.print(getString(str(label, dic.PageInfoLabel())));
        w.print(dic.PageInfoLabelPadding());
        // Add first item
        HtmlTag first = w.startTag(dic.PageInfoItemTag());
        first.endTag(String.valueOf(pagingInfo.getFirstItemIndex()+1));
        // Add Separator
        w.print(dic.PageInfoLabelTo());
        // Add last item
        HtmlTag last = w.startTag(dic.PageInfoItemTag());
        last.endTag(String.valueOf(pagingInfo.getLastItemIndex()+1));
        // Add of label
        w.print(dic.PageInfoLabelPadding());
        w.print(getString(str(of, dic.PageInfoLabelOf())));
        w.print(dic.PageInfoLabelPadding());
        // Add item count
        HtmlTag count = w.startTag(dic.PageInfoItemTag());
        count.endTag(String.valueOf(pagingInfo.getItemCount()));
        // end
        div.endTag();
        // Don't call base class
        return SKIP_BODY; // EVAL_BODY_BUFFERED; // EVAL_BODY_INCLUDE;

Examples of org.apache.empire.struts2.html.HtmlWriter

    public boolean start(Writer writer)
    {
        evaluateParams(); // We need to call this!
        try {
           
            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("target",   this.target);

Examples of org.apache.empire.struts2.html.HtmlWriter

            // Check writer
            if (writer==null)
                return false;
          
            // HtmlTagDictionary dic = HtmlTagDictionary.getInstance(); 
            HtmlWriter htmlWriter = new HtmlWriter(writer);

            // 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.target);
                a.addAttribute("class",    this.cssClass);
                a.addAttribute("style",    this.cssStyle);
                a.addAttribute("onclick"this.onclick);
                a.beginBody(text);
                a.endTag(body);
            }
            else
            {  
                // disabledTag = null
                HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
                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);
            }

Examples of org.apache.empire.struts2.html.HtmlWriter

        {   // not visible
            return SKIP_BODY;
        }
        // Start Tag
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag button = w.startTag ( dic.ButtonTag() );
        addStandardAttributes(button, dic.ButtonClass());
        button.beginBody();
        // Start Value
        this.id=null;
        this.cssClass=null;

Examples of org.apache.empire.struts2.html.HtmlWriter

        }   
        // End Tag
        int result = super.doEndTag();
        // Write End Tag
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag td = w.continueTag(dic.ButtonTag(), true);
        td.endTag();
        // done
        return result;
    }

Examples of org.apache.empire.struts2.html.HtmlWriter

        { // No Value
            if (recordValue == ObjectUtils.NO_VALUE)
                return false;

            // Render value
            HtmlWriter hw = new HtmlWriter(writer);
            render(hw, body, control);

            return false; // do not evaluate body again!

        } catch (Exception e)

Examples of org.apache.empire.struts2.html.HtmlWriter

    {      
        // Get the action
        Object action = getAction();
        if (action instanceof ActionErrorProvider)
        {   // Tabel cell tag
            HtmlWriter w = new HtmlWriter(pageContext.getOut());
            renderAllErrors(w, (ActionErrorProvider)action);
        }
        else
        {   // Error: Action does implement ActionErrorProvider
            log.error("Cannot render errors. Action does implement ActionErrorProvider.");

Examples of org.apache.empire.struts2.html.HtmlWriter

   
    @Override
    public int doStartTag() throws JspException
    {
        // Tabel cell tag
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag trTag = w.startTag("tr");
        trTag.addAttribute("id", getId());
        trTag.addAttribute("class", (isOddStatus() && cssOddClass!=null) ? cssOddClass : cssClass);
        trTag.addAttribute("style", (isOddStatus() && cssOddStyle!=null) ? cssOddStyle : cssStyle);
        trTag.beginBody();
        // Set Row Info

Examples of org.apache.empire.struts2.html.HtmlWriter

    {
        // Set current Column
        removePageAttribute(ROWINFO_ATTRIBUTE, oldRowInfo);
        oldRowInfo = null;
        // Write End Tag
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag trTag = w.continueTag("tr", true);
        trTag.endTag();
        // done
        resetParams();
        return EVAL_PAGE;
    }
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.