1 16 package org.apache.myfaces.custom.radio; 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 HtmlRadioTag 47 extends UIComponentTagBase 48 { 49 51 public String getComponentType() 52 { 53 return HtmlRadio.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 80 _for=null; 81 _index=null; 82 _enabledOnUserRole=null; 83 _visibleOnUserRole=null; 84 85 } 86 87 protected void setProperties(UIComponent component) 88 { 89 super.setProperties(component); 90 91 setStringProperty(component, HtmlRadio.FOR_ATTR, _for); 92 setIntegerProperty(component, HtmlRadio.INDEX_ATTR, _index); 93 94 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole); 95 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole); 96 } 97 98 public String getFor() 99 { 100 return _for; 101 } 102 103 public void setFor(String aFor) 104 { 105 _for = aFor; 106 } 107 108 public String getIndex() 109 { 110 return _index; 111 } 112 113 public void setIndex(String index) 114 { 115 _index = index; 116 } 117 118 public void setEnabledOnUserRole(String enabledOnUserRole) 119 { 120 _enabledOnUserRole = enabledOnUserRole; 121 } 122 123 public void setVisibleOnUserRole(String visibleOnUserRole) 124 { 125 _visibleOnUserRole = visibleOnUserRole; 126 } 127 } 128 | Popular Tags |