org.apache.tapestry.contrib.components
Class Choose
java.lang.Object
org.apache.tapestry.spec.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.components.Conditional
org.apache.tapestry.contrib.components.Choose
- All Implemented Interfaces:
- IComponent, ILocatable, ILocationHolder, IRender
public abstract class Choose
- extends Conditional
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 243893 2004-04-18 00:50:28Z dsolis $
- Author:
- David Solis
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 |
Choose
public Choose()
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)
.
- Specified by:
addBody
in interface IComponent
- Overrides:
addBody
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
evaluateCondition
protected boolean evaluateCondition()
- Overrides:
evaluateCondition
in class Conditional
getInvert
public boolean getInvert()
- Specified by:
getInvert
in class Conditional
getCondition
public abstract boolean getCondition()
- Specified by:
getCondition
in class Conditional
isConditionMet
public abstract boolean isConditionMet()
setConditionMet
public abstract void setConditionMet(boolean value)