1 16 package org.apache.myfaces.custom.fileupload; 17 18 import org.apache.myfaces.component.UserRoleAware; 19 import org.apache.myfaces.renderkit.html.HTML; 20 import org.apache.myfaces.taglib.html.HtmlInputTagBase; 21 22 import javax.faces.component.UIComponent; 23 24 28 public class HtmlInputFileUploadTag 29 extends HtmlInputTagBase 30 { 31 33 public String getComponentType() 34 { 35 return HtmlInputFileUpload.COMPONENT_TYPE; 36 } 37 38 public String getRendererType() 39 { 40 return "org.apache.myfaces.FileUpload"; 41 } 42 43 45 47 49 51 private String _accesskey; 53 private String _align; 54 private String _alt; private String _datafld; 56 private String _datasrc; 57 private String _dataformatas; 58 private String _disabled; 59 private String _maxlength; 60 private String _onblur; 61 private String _onchange; 62 private String _onfocus; 63 private String _onselect; 64 private String _readonly; 65 private String _size; 66 private String _tabindex; 67 68 71 74 private String _accept; 76 private String _storage; 77 78 private String _enabledOnUserRole; 80 private String _visibleOnUserRole; 81 82 83 public void release() { 84 super.release(); 85 _accesskey=null; 86 _align=null; 87 _alt=null; 88 _datafld=null; 89 _datasrc=null; 90 _dataformatas=null; 91 _disabled=null; 92 _maxlength=null; 93 _onblur=null; 94 _onchange=null; 95 _onfocus=null; 96 _onselect=null; 97 _readonly=null; 98 _size=null; 99 _tabindex=null; 100 _accept=null; 101 _storage=null; 102 _enabledOnUserRole=null; 103 _visibleOnUserRole=null; 104 } 105 106 protected void setProperties(UIComponent component) 107 { 108 super.setProperties(component); 109 110 setStringProperty(component, HTML.ACCESSKEY_ATTR, _accesskey); 111 setStringProperty(component, HTML.ALIGN_ATTR, _align); 112 setStringProperty(component, HTML.ALT_ATTR, _alt); 113 setStringProperty(component, HTML.DATAFLD_ATTR, _datafld); 114 setStringProperty(component, HTML.DATASRC_ATTR, _datasrc); 115 setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas); 116 setBooleanProperty(component, HTML.DISABLED_ATTR, _disabled); 117 setIntegerProperty(component, HTML.MAXLENGTH_ATTR, _maxlength); 118 setStringProperty(component, HTML.ONBLUR_ATTR, _onblur); 119 setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange); 120 setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus); 121 setStringProperty(component, HTML.ONSELECT_ATTR, _onselect); 122 setBooleanProperty(component, HTML.READONLY_ATTR, _readonly); 123 setIntegerProperty(component, HTML.SIZE_ATTR, _size); 124 setStringProperty(component, HTML.TABINDEX_ATTR, _tabindex); 125 126 setStringProperty(component, HTML.ACCEPT_ATTR, _accept); 127 setStringProperty(component, "storage", _storage); 128 129 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole); 130 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole); 131 } 132 133 public void setStorage(String storage) 134 { 135 _storage = storage; 136 } 137 138 public void setAccesskey(String accesskey) 139 { 140 _accesskey = accesskey; 141 } 142 143 public void setAlign(String align) 144 { 145 _align = align; 146 } 147 148 public void setAlt(String alt) 149 { 150 _alt = alt; 151 } 152 153 public void setDatafld(String datafld) 154 { 155 _datafld = datafld; 156 } 157 158 public void setDatasrc(String datasrc) 159 { 160 _datasrc = datasrc; 161 } 162 163 public void setDataformatas(String dataformatas) 164 { 165 _dataformatas = dataformatas; 166 } 167 168 public void setDisabled(String disabled) 169 { 170 _disabled = disabled; 171 } 172 173 public void setMaxlength(String maxlength) 174 { 175 _maxlength = maxlength; 176 } 177 178 public void setOnblur(String onblur) 179 { 180 _onblur = onblur; 181 } 182 183 public void setOnchange(String onchange) 184 { 185 _onchange = onchange; 186 } 187 188 public void setOnfocus(String onfocus) 189 { 190 _onfocus = onfocus; 191 } 192 193 public void setOnselect(String onselect) 194 { 195 _onselect = onselect; 196 } 197 198 public void setReadonly(String readonly) 199 { 200 _readonly = readonly; 201 } 202 203 public void setSize(String size) 204 { 205 _size = size; 206 } 207 208 public void setTabindex(String tabindex) 209 { 210 _tabindex = tabindex; 211 } 212 213 public void setAccept(String accept) 214 { 215 _accept = accept; 216 } 217 218 public void setEnabledOnUserRole(String enabledOnUserRole) 219 { 220 _enabledOnUserRole = enabledOnUserRole; 221 } 222 223 public void setVisibleOnUserRole(String visibleOnUserRole) 224 { 225 _visibleOnUserRole = visibleOnUserRole; 226 } 227 } 228 | Popular Tags |