org.apache.tapestry.components
Class IfBean

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.form.AbstractFormComponent
              extended by org.apache.tapestry.components.IfBean
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, IComponent, IRender

public abstract class IfBean
extends AbstractFormComponent

Author:
mb

Field Summary
static java.lang.String IF_VALUE_ATTRIBUTE
           
 
Constructor Summary
IfBean()
           
 
Method Summary
protected  boolean evaluateCondition(IRequestCycle cycle, IForm form, boolean cycleRewinding)
           
protected  boolean getCanTakeFocus()
          For component can not take focus.
abstract  boolean getCondition()
           
 boolean getConditionValue()
          Returns the value of the condition
abstract  IBinding getConditionValueBinding()
           
abstract  DataSqueezer getDataSqueezer()
           
abstract  java.lang.String getElement()
           
abstract  IActionListener getListener()
           
abstract  boolean getVolatile()
           
 boolean isDisabled()
          Returns true if the component is disabled.
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)to actually render the component (with any parameter values already set).
protected  void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
           
protected  void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
           
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getAlwaysRenderBodyOnRewind, getForm, getIdParameter, getName, isRequired, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, setClientId, setForm, setName, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.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.form.IFormComponent
getClientId, getDisplayName
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Field Detail

IF_VALUE_ATTRIBUTE

public static final java.lang.String IF_VALUE_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

IfBean

public IfBean()
Method Detail

getConditionValueBinding

public abstract IBinding getConditionValueBinding()

getCondition

public abstract boolean getCondition()

getVolatile

public abstract boolean getVolatile()

getElement

public abstract java.lang.String getElement()

getListener

public abstract IActionListener getListener()

renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
Description copied from class: AbstractComponent
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)to actually render the component (with any parameter values already set). This is the method that subclasses must implement.

Overrides:
renderComponent in class AbstractFormComponent
See Also:
AbstractComponent.renderComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

evaluateCondition

protected boolean evaluateCondition(IRequestCycle cycle,
                                    IForm form,
                                    boolean cycleRewinding)

getDataSqueezer

public abstract DataSqueezer getDataSqueezer()

isDisabled

public boolean isDisabled()
Description copied from interface: IFormComponent
Returns true if the component is disabled. This is important when the containing form is submitted, since disabled parameters do not update their bindings.


getConditionValue

public boolean getConditionValue()
Returns the value of the condition

Returns:
the condition value

renderFormComponent

protected void renderFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Specified by:
renderFormComponent in class AbstractFormComponent

rewindFormComponent

protected void rewindFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Specified by:
rewindFormComponent in class AbstractFormComponent

getCanTakeFocus

protected boolean getCanTakeFocus()
For component can not take focus.

Overrides:
getCanTakeFocus in class AbstractFormComponent