1 16 package org.apache.myfaces.custom.checkbox; 17 18 import org.apache.myfaces.component.UserRoleAware; 19 import org.apache.myfaces.taglib.UIComponentTagBase; 20 21 import javax.faces.component.UIComponent; 22 23 46 public class HtmlCheckboxTag 47 extends UIComponentTagBase 48 { 49 51 public String getComponentType() 52 { 53 return HtmlCheckbox.COMPONENT_TYPE; 54 } 55 56 public String getRendererType() 57 { 58 return null; 59 } 60 61 63 65 67 69 private String _for; 71 private String _index; 72 73 private String _enabledOnUserRole; 75 private String _visibleOnUserRole; 76 77 public void release() { 78 super.release(); 79 _for=null; 80 _index=null; 81 _enabledOnUserRole=null; 82 _visibleOnUserRole=null; 83 } 84 85 protected void setProperties(UIComponent component) 86 { 87 super.setProperties(component); 88 89 setStringProperty(component, HtmlCheckbox.FOR_ATTR, _for); 90 setIntegerProperty(component, HtmlCheckbox.INDEX_ATTR, _index); 91 92 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole); 93 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole); 94 } 95 96 public String getFor() 97 { 98 return _for; 99 } 100 101 public void setFor(String aFor) 102 { 103 _for = aFor; 104 } 105 106 public String getIndex() 107 { 108 return _index; 109 } 110 111 public void setIndex(String index) 112 { 113 _index = index; 114 } 115 116 public void setEnabledOnUserRole(String enabledOnUserRole) 117 { 118 _enabledOnUserRole = enabledOnUserRole; 119 } 120 121 public void setVisibleOnUserRole(String visibleOnUserRole) 122 { 123 _visibleOnUserRole = visibleOnUserRole; 124 } 125 } 126 | Popular Tags |