Examples of HtmlTagDictionary


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

    public int doStartTag()
        throws JspException
    {
        String userAgent = getUserAgent();
        // 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());
View Full Code Here

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

    @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

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

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

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

    */

    @Override
    protected void render(HtmlWriter writer, String body, InputControl control)
    {
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        // Check Render Type
        if (renderType==RenderType.HIDDEN)
        {   // Render Hidden input
            renderHiddenValue(writer);
        }
        else if (renderType==RenderType.LABEL)
        {
            // Render Label only
            HtmlTag label = writer.startTag("label");
            label.addAttribute("class", StringUtils.coalesce(this.labelClass, this.cssClass));
            label.addAttribute("style", StringUtils.coalesce(this.labelStyle, this.cssStyle));
            if (control.useLabelId())
                label.addAttribute("for", getId());
            label.beginBody(this.label);
            label.endTag();
        }
        else if (renderType==RenderType.CONTROL)
        {   // Render Input
            if (renderControlAsData(dic))
            {   // Render Input as Data
                control.renderText(writer, this);
            }
            else
            {   // Render Input as Control
                control.renderInput(writer, this);
            }
            // Additionally render hidden value?
            if (renderHidden())
                renderHiddenValue(writer);
        }
        else
        {   // Check wether to render all
            boolean renderWrapper =(renderType==RenderType.ALL);
           
            // the wrapper (only if renderLabel && renderControl are both true)
            HtmlTag wrapper = writer.startTag((renderWrapper ? dic.InputWrapperTag() : null));
            wrapper.addAttribute("class", dic.InputWrapperClass());
            wrapper.beginBody(true);

            if (renderType!=RenderType.INPUTCONTROL)
            {
                HtmlTag wrapLabel = writer.startTag(dic.InputLabelTag());
                wrapLabel.addAttribute("class", dic.InputLabelClass());
                wrapLabel.beginBody();
                // label
                HtmlTag label = writer.startTag("label");
                if (control.useLabelId())
                    label.addAttribute("for", getId());
                label.addAttribute("class", this.labelClass);
                label.addAttribute("style", this.labelStyle);
                label.beginBody(this.label);
                label.endTag(":");
                // required
                if ("true".equals(this.required) && readOnly == false)
                {
                    HtmlTag required = writer.startTag(dic.InputRequiredTag());
                    required.addAttribute("class", dic.InputRequiredClass());
                    required.beginBody("*");
                    required.endTag();
                }
                // close
                wrapLabel.endTag((renderType!=RenderType.INPUTLABEL));
            }

            // render Control
            if (renderType!=RenderType.INPUTLABEL)
            {
                HtmlTag wrapCtrl = writer.startTag(dic.InputControlTag());
                // Render Input
                if (renderControlAsData(dic))
                {   // Render Input as Data
                    wrapCtrl.addAttribute("class", dic.InputReadOnlyClass());
                    wrapCtrl.beginBody();
                    readOnly = true;
                    control.renderText(writer, this);
                }
                else
                {   // Render Input as Control
                    String wrapClass = (getDisabled() ? dic.InputReadOnlyClass() : dic.InputControlClass());  
                    wrapCtrl.addAttribute("class", wrapClass);
                    wrapCtrl.beginBody();
                    control.renderInput(writer, this);
                }
                // Additionally render hidden value?
                if (renderHidden())
                    renderHiddenValue(writer);
                // End Tag
                wrapCtrl.endTag(renderWrapper);
            }
           
            // Done
            String wrapperBody = (wrapper.isValid()) ? dic.InputWrapperBody() : null
            wrapper.endTag(wrapperBody);
        }
    }
View Full Code Here

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

    }

    @Override
    protected boolean renderWrapperTag()
    {
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance()
        return getBoolean(wrap, dic.FormDefaultRenderWrapper());
    }
View Full Code Here

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

       
        // 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)
            {   // Hide page number
View Full Code Here

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

    }
   
    @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

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

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

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

        if (getBoolean(visible, true)==false)
        {   // 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;
        this.cssStyle=null;
        // OnClick
        if (onclick==null && action!=null)
        {
            if (action.startsWith("!"))
                onclick = dic.ButtonSameActionDefaultOnClickScript();
            else
                onclick = dic.ButtonOtherActionDefaultOnClickScript();
        }
        // Render Value
        return super.doStartTag();
    }
View Full Code Here

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

            return EVAL_PAGE;
        }   
        // 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;
    }
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.