Examples of HtmlWriter


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

        // 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

    public boolean start(Writer writer)
    {
        evaluateParams(); // We need to call this!
        try {
           
            HtmlWriter htmlWriter = new HtmlWriter(writer);

            // render form Tag?
            if (readOnly==false)
            {
                urlRenderer.renderFormUrl(this);
                formTag = htmlWriter.startTag("form");
                formTag.addAttribute("id",       getId());
                formTag.addAttribute("name",     getName());
                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();

                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

        // User-Agent
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        flexDivRenderInfo = dic.FlexDivTag(type, userAgent);
        if (flexDivRenderInfo!=null)
        {   // Render Flex Div
            HtmlWriter w = new HtmlWriter(pageContext.getOut());
            HtmlTag tag = w.startTag(flexDivRenderInfo.tag);
            tag.addAttribute("id", getId());
            tag.addAttribute("class", cssClass);
            tag.addAttributes(flexDivRenderInfo.attributes);
            tag.beginBody(flexDivRenderInfo.bodyBegin);
        }

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

        throws JspException
    {
        // Render End Tag
        if (flexDivRenderInfo!=null)
        {   // End flexible Tag
            HtmlWriter w = new HtmlWriter(pageContext.getOut());
            HtmlTag tag = w.continueTag(flexDivRenderInfo.tag, true);
            tag.endTag(flexDivRenderInfo.bodyEnd);
            flexDivRenderInfo = null;
        }
        // return super.doEndTag();
        resetParams();

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

    @Override
    public int doStartTag() throws JspException
    {
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        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());
            wrapCtrl.addAttributes(dic.SubmitControlAttributes());
            wrapCtrl.beginBody();
        }
        // Button

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

   
    @Override
    public int doEndTag() throws JspException
    {
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        // End Button
        renderButtonEnd(w);
        // Has Wrappers
        if (getBoolean(embed, false))
        {   // End Control Wrapper
            HtmlTag wrapCtrl = w.continueTag( dic.SubmitControlTag(), true);
            wrapCtrl.endTag();
            // End Wrapper
            HtmlTag wrapper = w.continueTag( dic.InputWrapperTag(), true);
            wrapper.endTag();
        }   
        // done
        resetParams();
        // Done

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 wrap = w.startTag(tag);
        addStandardAttributes(wrap, null);
        wrap.beginBody(getTextValue());
        // return usesBody ? EVAL_BODY_BUFFERED : EVAL_BODY_INCLUDE;
        return EVAL_BODY_INCLUDE;
    }
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.