Package org.apache.empire.struts2.html

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


                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

        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

            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

    public int doStartTag()
        throws JspException
    {
        // super.doStartTag();
        // Write the float clear statement
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        String clear = dic.FloatClear();
        if (clear!=null)
        {   // Print the clear statement
            try {
                pageContext.getOut().print(clear);
            } catch (Exception e) {
View Full Code Here

        if (controlType==null)
            controlType = getControlType();
        // Default Class
        if (cssClass==null)
        {
            HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
            cssClass = dic.InputDefaultClass(controlType, isReadOnly());            
        }
        // Create
        InputControl control = InputControlManager.getControl(controlType);
        if (control == null)
            control = InputControlManager.getControl("text");
View Full Code Here

        {   // No Errors, nothing to render
            return;
        }
       
        // Render error list
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlTag list = w.startTag(dic.ErrorListTag());
        addStandardAttributes(list, dic.ErrorListClass());
        list.beginBody();
   
        // Are there field errors to render?
        if (hasFieldErrors)
        {   // Render all field errors
            Collection<ErrorInfo> errors = fieldErrors.values();
            String fieldErrClass = str(fieldErrorClass, dic.ErrorItemEntryClass());
            for (ErrorInfo e : errors)
            {
                String msg = provider.getLocalizedErrorMessage(e);
                renderError(w, fieldErrClass, msg);
            }
        }
       
        // Render last action error
        if (hasActionError)
        {   // Render action error
            String actionErrClass = str(actionErrorClass, dic.ErrorActionEntryClass());
            String msg = provider.getLocalizedErrorMessage(lastActionError);
            renderError(w, actionErrClass, msg);
        }

        // done
View Full Code Here

        list.endTag();
    }

    private void renderError(HtmlWriter w, String cssClassName, String msg)
    {
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlTag tag = w.startTag(dic.ErrorEntryTag());
        // Check whether additional wrapper is desired
        String wrapTag = dic.ErrorEntryWrapperTag();
        if (wrapTag!=null && wrapTag.length()>0)
        {   tag.beginBody();
            // Item wrapper tag
            HtmlTag wrap = w.startTag(wrapTag);
            wrap.addAttribute("class", cssClassName);
View Full Code Here

    @Override
    public int doStartTag() throws JspException
    {
        TableHeadRowTag.HeadRowInfo hri = getHeadRowInfo();
        // HtmlWriter
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        orderIndicator = getSortOrderIdicator(hri, dic);
        // Start Tag
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag wrap = w.startTag(dic.TableHeadColumnTag());
        wrap.addAttribute("id", getId());
        wrap.addAttribute("class", getCssClass(hri));
        setStyleAndWrap(wrap, hri);
        wrap.addAttribute("width", width);
        wrap.addAttribute("height", height);
        wrap.addAttribute("colspan", colspan);
        wrap.addAttribute("rowspan", rowspan);
        wrap.addAttribute("align", str(align, hri.columnAlign));
        wrap.addAttribute("valign", valign);
        wrap.addAttribute("bgcolor", bgcolor);
        // Body
        wrap.beginBody();
        if (prepareLinkParams(hri))
        {   // The Anchor
            this.cssClass = getLinkClass(hri, dic);
            this.cssStyle = null;
            // OnClick
            if (onclick== null)
                onclick = dic.TableHeadLinkDefaultOnClickScript();
            // render column choices
            if (select!=null)
            {
               renderColumnSelect(w);
               text = "";
View Full Code Here

   
    @Override
    public int doEndTag() throws JspException
    {
        // done
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag wrap = w.continueTag(dic.TableHeadColumnTag(), true);
        wrap.endTag();
        // done
        resetParams();
        return EVAL_PAGE;
    }
View Full Code Here

TOP

Related Classes of org.apache.empire.struts2.html.HtmlTagDictionary

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.