1 16 17 package org.apache.struts.faces.taglib; 18 19 20 import javax.faces.component.UIComponent; 21 22 23 29 30 public class FormTag extends AbstractFacesTag { 31 32 33 35 36 42 protected String action = null; 43 44 public void setAction(String action) { 45 this.action = action; 46 } 47 48 49 52 protected String enctype = null; 53 54 public void setEnctype(String enctype) { 55 this.enctype = enctype; 56 } 57 58 59 63 protected String focus = null; 64 65 public void setFocus(String focus) { 66 this.focus = focus; 67 } 68 69 70 73 protected String focusIndex = null; 74 75 public void setFocusIndex(String focusIndex) { 76 this.focusIndex = focusIndex; 77 } 78 79 80 83 protected String onreset = null; 84 85 public void setOnreset(String onreset) { 86 this.onreset = onreset; 87 } 88 89 90 93 protected String onsubmit = null; 94 95 public void setOnsubmit(String onsubmit) { 96 this.onsubmit = onsubmit; 97 } 98 99 100 103 protected String target = null; 104 105 public void setTarget(String target) { 106 this.target = target; 107 } 108 109 110 112 113 116 public void release() { 117 118 super.release(); 119 action = null; 120 enctype = null; 121 focus = null; 122 focusIndex = null; 123 onreset = null; 124 onsubmit = null; 125 target = null; 126 127 } 128 129 130 132 133 136 public String getComponentType() { 137 138 return ("org.apache.struts.faces.Form"); 139 140 } 141 142 143 147 public String getRendererType() { 148 149 return ("org.apache.struts.faces.Form"); 150 151 } 152 153 154 156 157 162 protected void setProperties(UIComponent component) { 163 164 super.setProperties(component); 165 setStringAttribute(component, "action", action); 166 setStringAttribute(component, "enctype", enctype); 167 setStringAttribute(component, "focus", focus); 168 setStringAttribute(component, "focusIndex", focusIndex); 169 setStringAttribute(component, "onreset", onreset); 170 setStringAttribute(component, "onsubmit", onsubmit); 171 setStringAttribute(component, "target", target); 172 173 } 174 175 176 } 177 | Popular Tags |