Package org.apache.empire.struts2.html

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


        // 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);
        }
View Full Code Here


        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();
View Full Code Here

    @Override
    public int doStartTag() throws JspException
    {
        // Tabel cell tag
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag thr = w.startTag(dic.TableHeadRowTag());
        addStandardAttributes(thr, null);
        thr.beginBody(true);
        // Set current Column
        HeadRowInfo hri = new HeadRowInfo();
        // Is sorting Info supplied
View Full Code Here

        // Set current Column
        removePageAttribute(HEADROWINFO_ATTRIBUTE, oldHeadRowInfo);
        oldHeadRowInfo = null;
        // Write End Tag
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag thr = w.continueTag (dic.TableHeadRowTag(), true);
        thr.endTag();
        // done
        resetParams();
        return EVAL_PAGE;
    }
View Full Code Here

        // Get Body
        String body = getBody();
        setBodyContent(null);
       
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        // Padding Text
        if (padding==null)
            padding = dic.PagerPaddingText();
        String pbeg_e = dic.PagerFirstPageText();
        String prwd_e = dic.PagerRewindText();
        String pfwd_e = dic.PagerForwardText();
        String pend_e = dic.PagerLastPageText();
        String pbeg_d = dic.PagerFirstPageTextDisabled();
        String prwd_d = dic.PagerRewindTextDisabled();
        String pfwd_d = dic.PagerForwardTextDisabled();
        String pend_d = dic.PagerLastPageTextDisabled();
        // Class and Styles
        HtmlTag div = w.startTag(dic.PagerTag());
        addStandardAttributes(div, dic.PagerClass());
        // Body
        div.beginBody(body, true);
        this.cssClass = str(linkClass, dic.PagerLinkClass());
        this.cssStyle = null;
        // onclick
        if (onclick== null)
            onclick = dic.PagerLinkDefaultOnClickScript();
        // Label?
        String pagerLabel = getString(str(label, dic.PagerLabelText()));
        if (pagerLabel!=null)
        {   // There is text
            HtmlTag label = w.startTag( dic.PagerLabelTag());
            label.addAttribute("class", dic.PagerLabelClass());
            label.endTag(pagerLabel);
        }
        // Back and fast back
        renderButton(w, pbeg_e, pbeg_d, true, pageCnt, current, 0);
        renderButton(w, prwd_e, prwd_d, true, pageCnt, current, Math.max(current - 1, 0) );
        // The Pages
        for (int pageIndex=begIndex; pageIndex<endIndex; pageIndex++)
        {
            // Padding
            if (pageIndex>0 && padding!=null)
                w.println(padding);
            // The Page selection
            HtmlTag page = w.startTag(dic.PagerPageTag());
            div.addAttribute("class", dic.PagerPageClass());
            page.beginBody();
            // The Anchors
            String pageText = String.valueOf(pageIndex+1);
            if (pageIndex>=pageCnt)
View Full Code Here

        // 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);
View Full Code Here

   
    @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;
View Full Code Here

    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);
View Full Code Here

            // 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);
            }
View Full Code Here

        {   // 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;
View Full Code Here

TOP

Related Classes of org.apache.empire.struts2.html.HtmlWriter$HtmlTag

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.