com.sun.rave.web.ui.component.util.descriptors
Class LayoutIf

java.lang.Object
  extended by com.sun.rave.web.ui.component.util.descriptors.LayoutElementBase
      extended by com.sun.rave.web.ui.component.util.descriptors.LayoutIf
All Implemented Interfaces:
LayoutElement, java.io.Serializable
Direct Known Subclasses:
LayoutWhile

public class LayoutIf
extends LayoutElementBase
implements LayoutElement

This class defines a LayoutIf LayoutElement. The LayoutIf provides the functionality necessary to conditionally display a portion of the layout tree. The condition is a boolean equation and may use "$...{...}" type expressions to substitute in values.

See Also:
VariableResolver, PermissionChecker, Serialized Form

Field Summary
 
Fields inherited from class com.sun.rave.web.ui.component.util.descriptors.LayoutElementBase
AFTER_ENCODE, BEFORE_ENCODE, ENCODE
 
Constructor Summary
LayoutIf(LayoutElement parent, java.lang.String condition)
          Constructor
 
Method Summary
protected  boolean encodeThis(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          This method returns true if the condition of this LayoutIf is met, false otherwise.
 java.lang.String getCondition()
          Accessor for condition boolean equation.
 
Methods inherited from class com.sun.rave.web.ui.component.util.descriptors.LayoutElementBase
addChildLayoutElement, createHandlerContext, dispatchHandlers, dispatchHandlers, encode, encodeChild, getChildLayoutElements, getHandlers, getHandlers, getHandlersByTypeMap, getId, getLayoutDefinition, getParent, getUnevaluatedId, resolveValue, setHandlers, setHandlersByTypeMap, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.rave.web.ui.component.util.descriptors.LayoutElement
addChildLayoutElement, dispatchHandlers, dispatchHandlers, encode, getChildLayoutElements, getHandlers, getId, getLayoutDefinition, getParent, getUnevaluatedId, setHandlers
 

Constructor Detail

LayoutIf

public LayoutIf(LayoutElement parent,
                java.lang.String condition)
Constructor

Method Detail

getCondition

public java.lang.String getCondition()
Accessor for condition boolean equation.


encodeThis

protected boolean encodeThis(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component)
This method returns true if the condition of this LayoutIf is met, false otherwise. This provides the functionality for conditionally displaying a portion of the layout tree.

Specified by:
encodeThis in class LayoutElementBase
Parameters:
context - The FacesContext
component - The UIComponent
Returns:
true if children are to be rendered, false otherwise.