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