edu.nrao.sss.webapp.faces.component
Class IfUIComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by edu.nrao.sss.webapp.faces.component.IfUIComponent
All Implemented Interfaces:
StateHolder

public class IfUIComponent
extends UIComponentBase

The If component isn't really a UI component so much as a flow control component. It only accepts an attribute named "test". If the value of test resolves to true (either the string "true", "1" or a boolean value of true), then the body of the tag is rendered. Otherwise, it is not.

Author:
btruitt
See Also:
IfTag

Constructor Summary
IfUIComponent()
           
 
Method Summary
 void encodeBegin(FacesContext context)
          Empty implementation.
 void encodeChildren(FacesContext context)
           
 void encodeEnd(FacesContext context)
          Empty implementation.
 String getFamily()
          This method is only important if you're developing your own component family.
 boolean getRendersChildren()
           
 Boolean getTest()
           
 void restoreState(FacesContext context, Object state)
           
 Object saveState(FacesContext context)
           
 void setTest(Boolean test)
           
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfUIComponent

public IfUIComponent()
Method Detail

getFamily

public String getFamily()
This method is only important if you're developing your own component family. If not, you can return whatever.

Specified by:
getFamily in class UIComponent

getRendersChildren

public boolean getRendersChildren()
Overrides:
getRendersChildren in class UIComponentBase

encodeChildren

public void encodeChildren(FacesContext context)
                    throws IOException
Overrides:
encodeChildren in class UIComponentBase
Throws:
IOException

encodeBegin

public void encodeBegin(FacesContext context)
                 throws IOException
Empty implementation.

Overrides:
encodeBegin in class UIComponentBase
Throws:
IOException

encodeEnd

public void encodeEnd(FacesContext context)
               throws IOException
Empty implementation.

Overrides:
encodeEnd in class UIComponentBase
Throws:
IOException

getTest

public Boolean getTest()

setTest

public void setTest(Boolean test)

saveState

public Object saveState(FacesContext context)
Specified by:
saveState in interface StateHolder
Overrides:
saveState in class UIComponentBase

restoreState

public void restoreState(FacesContext context,
                         Object state)
Specified by:
restoreState in interface StateHolder
Overrides:
restoreState in class UIComponentBase


Copyright © 2009. All Rights Reserved.