1 64 65 package com.jcorporate.expresso.services.html; 66 67 72 73 import java.io.PrintWriter ; 74 75 76 82 public class HiddenField 83 extends HtmlElement { 84 protected String fieldName = null; 85 protected String fieldValue = (""); 86 87 92 public HiddenField() 93 throws HtmlException { 94 super(); 95 } 96 97 105 public HiddenField(String newFieldName, String newFieldValue) 106 throws HtmlException { 107 super(newFieldName); 108 fieldName = newFieldName; 109 fieldValue = newFieldValue; 110 } 111 112 119 protected void display(PrintWriter out, int depth) 120 throws HtmlException { 121 this.padWithTabs(out, depth); 122 out.print("<input"); 123 124 if (cSSClass != null) { 125 out.print(" class=\"" + cSSClass + "\""); 126 } 127 if (cSSID != null) { 128 out.print(" id=\"" + cSSID + "\""); 129 } 130 131 out.println(" type=hidden name=" + fieldName + " value=\"" + 132 fieldValue + "\"/>"); 133 setDisplayed(); 134 } 135 136 137 } 138 139 | Popular Tags |