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.HtmlCommandButton; 20 import org.apache.myfaces.taglib.html.HtmlCommandButtonTagBase; 21 22 import javax.faces.component.UIComponent; 23 24 50 public class HtmlCommandButtonTag 51 extends HtmlCommandButtonTagBase 52 { 53 public String getComponentType() 54 { 55 return HtmlCommandButton.COMPONENT_TYPE; 56 } 57 58 public String getRendererType() 59 { 60 return "org.apache.myfaces.Button"; 61 } 62 63 private String _enabledOnUserRole; 64 private String _visibleOnUserRole; 65 66 public void release() { 67 super.release(); 68 69 _enabledOnUserRole=null; 70 _visibleOnUserRole=null; 71 } 72 73 protected void setProperties(UIComponent component) 74 { 75 super.setProperties(component); 76 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole); 77 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole); 78 } 79 80 public void setEnabledOnUserRole(String enabledOnUserRole) 81 { 82 _enabledOnUserRole = enabledOnUserRole; 83 } 84 85 public void setVisibleOnUserRole(String visibleOnUserRole) 86 { 87 _visibleOnUserRole = visibleOnUserRole; 88 } 89 90 } 91 | Popular Tags |