org.apache.tapestry.components
Class ForBean
java.lang.Object
org.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.form.AbstractFormComponent
org.apache.tapestry.components.ForBean
- All Implemented Interfaces:
- org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, IComponent, IRender
public abstract class ForBean
- extends AbstractFormComponent
- Author:
- mb
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent |
getForm, getIdParameter, getName, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, select, 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, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, 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.IComponent |
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, 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 |
ForBean
public ForBean()
getSource
public abstract java.lang.Object getSource()
getFullSource
public abstract java.lang.Object getFullSource()
getElement
public abstract java.lang.String getElement()
getVolatile
public abstract boolean getVolatile()
getDefaultValue
public abstract java.lang.Object getDefaultValue()
getPrimaryKey
public abstract java.lang.String getPrimaryKey()
getConverter
public abstract IPrimaryKeyConverter getConverter()
getKeyExpression
public abstract java.lang.String getKeyExpression()
getPrimaryKeyMap
public abstract java.util.Map getPrimaryKeyMap()
setPrimaryKeyMap
public abstract void setPrimaryKeyMap(java.util.Map primaryKeys)
getDataSqueezer
public abstract DataSqueezer getDataSqueezer()
getValueConverter
public abstract ValueConverter getValueConverter()
getExpressionEvaluator
public abstract ExpressionEvaluator getExpressionEvaluator()
getSourceData
protected java.util.Iterator getSourceData()
- Gets the source binding and returns an
Iterator
representing
the values identified by the source. Returns an empty Iterator
if the binding, or the binding value, is null.
Invokes Tapestry#coerceToIterator(Object)
to perform
the actual conversion.
storeSourceData
protected java.util.Iterator storeSourceData(IForm form,
java.lang.String name)
getStoredData
protected java.util.Iterator getStoredData(IRequestCycle cycle,
java.lang.String name)
renderComponent
protected void renderComponent(IMarkupWriter writer,
IRequestCycle cycle)
- Gets the source binding and iterates through
its values. For each, it updates the value binding and render's its wrapped elements.
- Overrides:
renderComponent
in class AbstractFormComponent
- See Also:
AbstractComponent.renderComponent(org.apache.tapestry.IMarkupWriter,
org.apache.tapestry.IRequestCycle)
getValue
public final java.lang.Object getValue()
- Returns the most recent value extracted from the source parameter.
- Throws:
org.apache.tapestry.ApplicationRuntimeException
- if the Foreach is not currently rendering.
getIndex
public int getIndex()
- The index number, within the
source
, of the
the current value.
- Throws:
org.apache.tapestry.ApplicationRuntimeException
- if the Foreach is not currently rendering.- Since:
- 2.2
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.
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