org.apache.tapestry.contrib.components
Class Choose

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.components.Conditional
              extended by org.apache.tapestry.contrib.components.Choose
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IComponent, IDirectEvent, Component, 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]

Author:
David Solis

Field Summary
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
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.
protected  boolean evaluateCondition()
           
abstract  boolean getCondition()
           
 boolean getInvert()
           
abstract  boolean isConditionMet()
           
abstract  void setConditionMet(boolean value)
           
 
Methods inherited from class org.apache.tapestry.components.Conditional
getElement, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addComponent, checkActiveLock, enterActiveState, equals, finishLoad, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainedRenderers, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getInnerRenderers, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, peekClientId, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
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).

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.

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)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.