1 16 package org.apache.myfaces.renderkit.html.ext; 17 18 import org.apache.myfaces.component.UserRoleUtils; 19 import org.apache.myfaces.renderkit.html.HtmlLinkRendererBase; 20 21 import javax.faces.component.UIComponent; 22 import javax.faces.component.UIOutput; 23 import javax.faces.context.FacesContext; 24 import java.io.IOException ; 25 26 43 public class HtmlLinkRenderer 44 extends HtmlLinkRendererBase 45 { 46 48 protected void renderCommandLinkStart(FacesContext facesContext, 49 UIComponent component, 50 String clientId, 51 Object value, 52 String style, 53 String styleClass) throws IOException 54 { 55 if (UserRoleUtils.isEnabledOnUserRole(component)) 57 { 58 super.renderCommandLinkStart(facesContext, component, clientId, value, style, styleClass); 59 } 60 } 61 62 protected void renderOutputLinkStart(FacesContext facesContext, UIOutput output) throws IOException 63 { 64 if (UserRoleUtils.isEnabledOnUserRole(output)) 66 { 67 super.renderOutputLinkStart(facesContext, output); 68 } 69 } 70 71 protected void renderLinkEnd(FacesContext facesContext, UIComponent component) throws IOException 72 { 73 if (UserRoleUtils.isEnabledOnUserRole(component)) 75 { 76 super.renderLinkEnd(facesContext, component); 77 } 78 } 79 80 } 81 | Popular Tags |