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

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


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


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

   
    private void renderHiddenValue(HtmlWriter writer)
    {
        // Render Hidden input
        HtmlTag input = writer.startTag("input");
        input.addAttribute("type", "hidden");
        input.addAttribute("name", getName()+ "!");
        // Get Value
        String value;
        if (recordValue instanceof Date)
        {   // Special for Dates and timestamps
View Full Code Here

    private void renderHiddenValue(HtmlWriter writer)
    {
        // Render Hidden input
        HtmlTag input = writer.startTag("input");
        input.addAttribute("type", "hidden");
        input.addAttribute("name", getName()+ "!");
        // Get Value
        String value;
        if (recordValue instanceof Date)
        {   // Special for Dates and timestamps
            String format = (column!=null && column.getDataType()==DataType.DATE) ? "yyyy-MM-dd" : "yyyy-MM-dd HH:mm:ss.S";
View Full Code Here

        {   // Let Record do the conversion
            value = StringUtils.valueOf(recordValue);
        }
        // Add Value Attribute
        if (value.length()>0)
            input.addAttribute("value", value);
        else
            writer.print("value=\"\"");
        input.endTag();
    }
   
View Full Code Here

   
    @Override
    public void renderInput(HtmlWriter writer, ControlInfo ci)
    {
        HtmlTag input = writer.startTag("input");
        input.addAttribute("type", "text");
        input.addAttribute("id",    ci.getId());
        input.addAttribute("class", ci.getCssClass());
        input.addAttribute("style", ci.getCssStyle());
        if (ci.getDisabled()==false)
        {   // Name of the field
View Full Code Here

    @Override
    public void renderInput(HtmlWriter writer, ControlInfo ci)
    {
        HtmlTag input = writer.startTag("input");
        input.addAttribute("type", "text");
        input.addAttribute("id",    ci.getId());
        input.addAttribute("class", ci.getCssClass());
        input.addAttribute("style", ci.getCssStyle());
        if (ci.getDisabled()==false)
        {   // Name of the field
            input.addAttribute("name", ci.getName());
View Full Code Here

    public void renderInput(HtmlWriter writer, ControlInfo ci)
    {
        HtmlTag input = writer.startTag("input");
        input.addAttribute("type", "text");
        input.addAttribute("id",    ci.getId());
        input.addAttribute("class", ci.getCssClass());
        input.addAttribute("style", ci.getCssStyle());
        if (ci.getDisabled()==false)
        {   // Name of the field
            input.addAttribute("name", ci.getName());
            // Get Max Length
View Full Code Here

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

    {
        HtmlTag input = writer.startTag("input");
        input.addAttribute("type", "text");
        input.addAttribute("id",    ci.getId());
        input.addAttribute("class", ci.getCssClass());
        input.addAttribute("style", ci.getCssStyle());
        if (ci.getDisabled()==false)
        {   // Name of the field
            input.addAttribute("name", ci.getName());
            // Get Max Length
            int maxLength = getMaxInputLength(ci.getColumn());
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.