001 package edu.nrao.sss.webapp.faces.component; 002 003 import javax.faces.component.UIComponentBase; 004 import javax.faces.component.UIComponent; 005 006 /** 007 * <p>The True component isn't really a UI component so much as a flow control component. 008 * It only has meaning inside an If tag. This does not render itself at all. 009 * @author btruitt 010 * @see edu.nrao.sss.webapp.faces.tag.TrueTag 011 */ 012 public class TrueUIComponent extends UIComponentBase 013 { 014 public String getFamily() 015 { 016 return "NRAO"; 017 } 018 019 public boolean getRendersChildren() 020 { 021 return false; 022 } 023 024 public boolean isRendered() 025 { 026 UIComponent c = getParent(); 027 if (c instanceof IfUIComponent) 028 { 029 IfUIComponent parent = (IfUIComponent)c; 030 return parent.getTest(); 031 } 032 033 else 034 return false; 035 } 036 }