1 16 package org.apache.myfaces.taglib.html.ext; 17 18 import org.apache.myfaces.component.UserRoleAware; 19 import org.apache.myfaces.component.html.ext.HtmlOutputLabel; 20 import org.apache.myfaces.taglib.html.HtmlOutputLabelTagBase; 21 22 import javax.faces.component.UIComponent; 23 24 47 public class HtmlOutputLabelTag 48 extends HtmlOutputLabelTagBase 49 { 50 public String getComponentType() 51 { 52 return HtmlOutputLabel.COMPONENT_TYPE; 53 } 54 55 public String getRendererType() 56 { 57 return "javax.faces.Label"; 58 } 59 60 private String _enabledOnUserRole; 61 private String _visibleOnUserRole; 62 63 public void release() { 64 super.release(); 65 _enabledOnUserRole=null; 66 _visibleOnUserRole=null; 67 } 68 69 protected void setProperties(UIComponent component) 70 { 71 super.setProperties(component); 72 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole); 73 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole); 74 } 75 76 public void setEnabledOnUserRole(String enabledOnUserRole) 77 { 78 _enabledOnUserRole = enabledOnUserRole; 79 } 80 81 public void setVisibleOnUserRole(String visibleOnUserRole) 82 { 83 _visibleOnUserRole = visibleOnUserRole; 84 } 85 86 } 87 | Popular Tags |