1 23 package com.sun.enterprise.tools.jsfext.layout.descriptor; 24 25 import java.io.IOException ; 26 27 import javax.faces.context.FacesContext; 28 import javax.faces.component.UIComponent; 29 30 31 39 public class LayoutFacet extends LayoutElementBase implements LayoutElement { 40 41 44 public LayoutFacet(LayoutElement parent, String id) { 45 super(parent, id); 46 } 47 48 64 public boolean isRendered() { 65 return _rendered; 66 } 67 68 71 public void setRendered(boolean render) { 72 _rendered = render; 73 } 74 75 87 protected boolean encodeThis(FacesContext context, UIComponent component) throws IOException { 88 if (!isRendered()) { 90 return false; 91 } 92 93 component = (UIComponent) component.getFacets(). 95 get(getId(context, component)); 96 if (component != null) { 97 encodeChild(context, component); 99 100 return false; 102 } 103 104 return true; 106 } 107 108 private boolean _rendered = true; 109 } 110 | Popular Tags |