1 16 package org.apache.myfaces.custom.inputHtml; 17 18 import javax.faces.component.UIComponent; 19 20 import org.apache.myfaces.component.UserRoleAware; 21 import org.apache.myfaces.renderkit.JSFAttr; 22 import org.apache.myfaces.taglib.UIComponentTagBase; 23 24 79 public class InputHtmlTag extends UIComponentTagBase { 80 81 private String style; 82 private String styleClass; 83 84 private String fallback; 85 private String type; 86 87 private String allowEditSource; 88 private String allowExternalLinks; 89 private String addKupuLogo; 90 91 private String showAllToolBoxes; 92 private String showPropertiesToolBox; 93 private String showLinksToolBox; 94 private String showImagesToolBox; 95 private String showTablesToolBox; 96 private String showCleanupExpressionsToolBox; 97 private String showDebugToolBox; 98 99 private String enabledOnUserRole; 100 private String visibleOnUserRole; 101 102 private String immediate; 103 private String required; 104 private String validator; 105 private String valueChangeListener; 106 107 public void release() { 108 super.release(); 109 style=null; 110 styleClass=null; 111 fallback=null; 112 type=null; 113 allowEditSource=null; 114 allowExternalLinks=null; 115 addKupuLogo=null; 116 117 showAllToolBoxes=null; 118 showPropertiesToolBox=null; 119 showLinksToolBox=null; 120 showImagesToolBox=null; 121 showTablesToolBox=null; 122 showCleanupExpressionsToolBox=null; 123 showDebugToolBox=null; 124 enabledOnUserRole=null; 125 visibleOnUserRole=null; 126 127 immediate=null; 128 required=null; 129 validator=null; 130 valueChangeListener=null; 131 } 132 133 protected void setProperties(UIComponent component) { 134 super.setProperties(component); 135 136 setStringProperty(component, "style", style); 137 setStringProperty(component, "styleClass", styleClass); 138 139 setStringProperty(component, "fallback", fallback); 140 setBooleanProperty(component, "type", type); 141 142 setBooleanProperty(component, "allowEditSource", allowEditSource); 143 setBooleanProperty(component, "allowExternalLinks", allowExternalLinks); 144 setBooleanProperty(component, "addKupuLogo", addKupuLogo); 145 146 setBooleanProperty(component, "showAllToolBoxes", showAllToolBoxes); 147 setBooleanProperty(component, "showPropertiesToolBox", showPropertiesToolBox); 148 setBooleanProperty(component, "showLinksToolBox", showLinksToolBox); 149 setBooleanProperty(component, "showImagesToolBox", showImagesToolBox); 150 setBooleanProperty(component, "showTablesToolBox", showTablesToolBox); 151 setBooleanProperty(component, "showCleanupExpressionsToolBox", showCleanupExpressionsToolBox); 152 setBooleanProperty(component, "showDebugToolBox", showDebugToolBox); 153 154 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, enabledOnUserRole); 155 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, visibleOnUserRole); 156 157 setBooleanProperty(component, JSFAttr.IMMEDIATE_ATTR, immediate); 158 setBooleanProperty(component, JSFAttr.REQUIRED_ATTR, required); 159 setValidatorProperty(component, validator); 160 setValueChangedListenerProperty(component, valueChangeListener); 161 } 162 163 public String getComponentType() { 164 return InputHtml.COMPONENT_TYPE; 165 } 166 167 public String getRendererType() { 168 return InputHtml.DEFAULT_RENDERER_TYPE; 169 } 170 171 public void setStyle(String style){ 172 this.style = style; 173 } 174 175 public void setStyleClass(String styleClass){ 176 this.styleClass = styleClass; 177 } 178 179 public void setFallback(String fallback){ 180 this.fallback = fallback; 181 } 182 183 public void setType(String type){ 184 this.type = type; 185 } 186 187 public void setAllowEditSource(String allowEditSource){ 188 this.allowEditSource = allowEditSource; 189 } 190 191 public void setAllowExternalLinks(String allowExternalLinks){ 192 this.allowExternalLinks = allowExternalLinks; 193 } 194 195 public void setAddKupuLogo(String addKupuLogo){ 196 this.addKupuLogo = addKupuLogo; 197 } 198 199 public void setShowAllToolBoxes(String showAllToolBoxes){ 200 this.showAllToolBoxes = showAllToolBoxes; 201 } 202 203 public void setShowPropertiesToolBox(String showPropertiesToolBox){ 204 this.showPropertiesToolBox = showPropertiesToolBox; 205 } 206 207 public void setShowLinksToolBox(String showLinksToolBox){ 208 this.showLinksToolBox = showLinksToolBox; 209 } 210 211 public void setShowImagesToolBox(String showImagesToolBox){ 212 this.showImagesToolBox = showImagesToolBox; 213 } 214 215 public void setShowTablesToolBox(String showTablesToolBox){ 216 this.showTablesToolBox = showTablesToolBox; 217 } 218 219 public void setShowCleanupExpressionsToolBox(String showCleanupExpressionsToolBox){ 220 this.showCleanupExpressionsToolBox = showCleanupExpressionsToolBox; 221 } 222 223 public void setShowDebugToolBox(String showDebugToolBox){ 224 this.showDebugToolBox = showDebugToolBox; 225 } 226 227 public void setEnabledOnUserRole(String enabledOnUserRole){ 228 this.enabledOnUserRole = enabledOnUserRole; 229 } 230 231 public void setVisibleOnUserRole(String visibleOnUserRole){ 232 this.visibleOnUserRole = visibleOnUserRole; 233 } 234 235 public void setImmediate(String immediate){ 236 this.immediate = immediate; 237 } 238 239 public void setRequired(String required){ 240 this.required = required; 241 } 242 243 public void setValidator(String validator){ 244 this.validator = validator; 245 } 246 247 public void setValueChangeListener(String valueChangeListener){ 248 this.valueChangeListener = valueChangeListener; 249 } 250 } | Popular Tags |