org.apache.tapestry.contrib.form
Class FormConditional

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.contrib.form.FormConditional
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, IComponent, IDirectEvent, Component, IRender

public abstract class FormConditional
extends AbstractComponent
implements IFormComponent

A conditional element on a page which will render its wrapped elements zero or one times. This component is a variant of Conditional, but is designed for operation in a form. The component parameters are stored in hidden fields during rendering and are taken from those fields during the rewind, thus no StaleLink exceptions occur. [ Component Reference ]

Since:
3.0
Author:
Mindbridge

Field Summary
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
FormConditional()
           
 
Method Summary
abstract  boolean getCondition()
           
abstract  DataSqueezer getDataSqueezer()
           
abstract  String getElement()
           
abstract  IActionListener getListener()
           
abstract  ListenerInvoker getListenerInvoker()
          Injected.
 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).
abstract  void setConditionValue(boolean value)
           
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, 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.tapestry.form.IFormComponent
getClientId, getDisplayName, getForm, getName, isRequired, setName
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName
 
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
 

Constructor Detail

FormConditional

public FormConditional()
Method Detail

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.

Specified by:
renderComponent in class AbstractComponent

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.

Specified by:
isDisabled in interface IFormComponent

getCondition

public abstract boolean getCondition()

setConditionValue

public abstract void setConditionValue(boolean value)

getElement

public abstract String getElement()

getListener

public abstract IActionListener getListener()

getListenerInvoker

public abstract ListenerInvoker getListenerInvoker()
Injected.

Since:
4.0


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