Examples of HtmlTagDictionary


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

                // append height
                double height = Math.max(ci.getVSize(), 2) * 1.25;
                style +=  "height:" + height + "em";
            }
            // Wrap read only in a div if it's a control
            HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
            HtmlTag div = writer.startTag(dic.InputReadOnlyDataWrapperTag());
            div.addAttribute("id",    ci.getId());
            div.addAttribute("class", ci.getCssClass());
            div.addAttribute("style", style);
            div.beginBody();
            internalRenderText(writer, vi);
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

    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

    public void renderText(HtmlWriter writer, ValueInfo vi)
    {
        if (vi instanceof ControlInfo)
        {   // Wrap read only in a div if it's a control
            ControlInfo ci = ((ControlInfo)vi);
            HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
            HtmlTag div = writer.startTag(dic.InputReadOnlyDataWrapperTag());
            div.addAttribute("id",    ci.getId());
            div.addAttribute("class", ci.getCssClass());
            div.addAttribute("style", ci.getCssStyle());
            div.beginBody();
            internalRenderText(writer, vi);
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());
        // 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
        renderButtonStart(w);
        // return usesBody ? EVAL_BODY_BUFFERED : EVAL_BODY_INCLUDE;
View Full Code Here

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

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

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

    {
        // get Default Class
        if (cssClass!=null)
            return cssClass;
        // Get Class from Dictionary
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        return dic.SubmitClass();
    }
View Full Code Here

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

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

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

        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

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

        String msg = provider.getLastActionMessage(true);
        if (msg==null || msg.length()==0)
            return; // Nothing to render

        // Render error list
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlTag tag = w.startTag(dic.MessageTag());
        addStandardAttributes(tag, dic.MessageClass());
        tag.endTag(msg);
    }
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.