1 23 package com.sun.enterprise.tools.jsfext.layout.descriptor; 24 25 import com.sun.enterprise.tools.jsfext.el.PermissionChecker; 26 27 import javax.faces.component.UIComponent; 28 import javax.faces.context.FacesContext; 29 30 31 42 public class LayoutIf extends LayoutElementBase implements LayoutElement { 43 44 47 public LayoutIf(LayoutElement parent, String condition) { 48 super(parent, null); 49 _condition = condition; 50 } 51 52 53 56 public String getCondition() { 57 return _condition; 58 } 59 60 61 71 protected boolean encodeThis(FacesContext context, UIComponent component) { 72 PermissionChecker checker = 73 new PermissionChecker(this, component, getCondition()); 74 return checker.hasPermission(); 76 } 77 78 private String _condition = null; 79 } 80 | Popular Tags |