org.apache.tapestry.contrib.components
Class Choose

java.lang.Object
  |
  +--org.apache.tapestry.spec.BaseLocatable
        |
        +--org.apache.tapestry.AbstractComponent
              |
              +--org.apache.tapestry.contrib.components.Choose
All Implemented Interfaces:
IComponent, ILocatable, ILocationHolder, IRender

public abstract class Choose
extends AbstractComponent

This component is a container for When or Otherwise components; it provides the context for mutually exclusive conditional evaluation. [Component Reference]

Version:
$Id: Choose.java,v 1.2 2003/08/06 02:56:54 dsolis Exp $
Author:
David Solis

Constructor Summary
Choose()
           
 
Method Summary
 void addBody(IRender element)
          Adds an element (which may be static text or a component) as a body element of this component.
protected  void cleanupAfterRender(IRequestCycle cycle)
          Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle) after the component renders, to clear any parameters back to null (or 0, or false, or whatever the correct default is).
abstract  boolean isConditionMet()
           
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          Renders its wrapped components.
abstract  void setConditionMet(boolean value)
           
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.tapestry.spec.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Constructor Detail

Choose

public Choose()
Method Detail

addBody

public void addBody(IRender element)
Description copied from class: AbstractComponent
Adds an element (which may be static text or a component) as a body element of this component. Such elements are rendered by AbstractComponent.renderBody(IMarkupWriter, IRequestCycle).
Overrides:
addBody in class AbstractComponent

renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
Renders its wrapped components.
Overrides:
renderComponent in class AbstractComponent

cleanupAfterRender

protected void cleanupAfterRender(IRequestCycle cycle)
Description copied from class: AbstractComponent
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle) after the component renders, to clear any parameters back to null (or 0, or false, or whatever the correct default is). Primarily, this is used to ensure that the component doesn't hold onto any objects that could otherwise be garbage collected.

Subclasses may override this implementation, but must also invoke it.

Overrides:
cleanupAfterRender in class AbstractComponent

isConditionMet

public abstract boolean isConditionMet()

setConditionMet

public abstract void setConditionMet(boolean value)