Package org.apache.empire.struts2.html.HtmlWriter

Examples of org.apache.empire.struts2.html.HtmlWriter.HtmlTag.beginBody()


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


            if (getBoolean(allownull, false) && options.contains(null)==false)
            {   // add an empty entry
                HtmlTag option = w.startTag("option");
                option.addAttributeNoCheck("value", "", false);
                option.addAttribute("selected", ObjectUtils.isEmpty(current));
                option.beginBody("");
                option.endTag(true);
            }
            for (OptionEntry entry : options)
            {
                Object value = entry.getValue();
View Full Code Here

                boolean isCurrent = ObjectUtils.compareEqual(current, value);
                // Add Option entry
                HtmlTag option = w.startTag("option");
                option.addAttributeNoCheck("value", value, true);
                option.addAttribute("selected", isCurrent);
                option.beginBody(getTranslation(entry.getText()));
                option.endTag(true);
            }
        }
        else
        {   // No Option list available
View Full Code Here

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

        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);
            wrap.endTag(msg);
        }
View Full Code Here

        radioGroupWrapper.addAttribute("cellspacing", "0");
        radioGroupWrapper.addAttribute("cellpadding", "0");
        radioGroupWrapper.addAttribute("id",    ci.getId());
        radioGroupWrapper.addAttribute("class", ci.getCssClass());
        radioGroupWrapper.addAttribute("style", ci.getCssStyle());
        radioGroupWrapper.beginBody();
       
        // Get options
        Options options = ci.getOptions();
        if (options!=null)
        {   // Doing a label top, radio bottom table layout
View Full Code Here

        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag trTag = w.startTag("tr");
        trTag.addAttribute("id", getId());
        trTag.addAttribute("class", (isOddStatus() && cssOddClass!=null) ? cssOddClass : cssClass);
        trTag.addAttribute("style", (isOddStatus() && cssOddStyle!=null) ? cssOddStyle : cssStyle);
        trTag.beginBody();
        // Set Row Info
        RowInfo ri = new RowInfo();
        ri.currentColumn = currentColumn; 
        ri.columnClass = columnClass;
        ri.currentClass = currentClass;
View Full Code Here

    private void renderLabel(HtmlWriter writer, ControlInfo ci, OptionEntry entry, int pairs)
    {
        HtmlTag label = writer.startTag("label");
        label.addAttribute("for", ci.getId() + pairs);
        label.beginBody(ci.getTranslation(entry.getText()));
        label.endTag();
    }
   
    private void renderLabelAboveControl(HtmlWriter writer, ControlInfo ci, Options options)
    {
View Full Code Here

    private void renderLabelAboveControl(HtmlWriter writer, ControlInfo ci, Options options)
    {
        int pairs = 1;
        HtmlTag row = writer.startTag("tr");
        // do label row (th)
        row.beginBody();
        for (OptionEntry entry : options)
        {
            HtmlTag td = writer.startTag("th");
            td.beginBody();
            renderLabel(writer, ci, entry, pairs);
View Full Code Here

        // do label row (th)
        row.beginBody();
        for (OptionEntry entry : options)
        {
            HtmlTag td = writer.startTag("th");
            td.beginBody();
            renderLabel(writer, ci, entry, pairs);
            td.endTag();
            pairs ++;
        }
        row.endTag();
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.