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