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, 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, 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, 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)
getSourceIteratorMap
public abstract java.util.Map getSourceIteratorMap()
setSourceIteratorMap
public abstract void setSourceIteratorMap(java.util.Map sourceIteratorMap)
getDataSqueezer
public abstract DataSqueezer getDataSqueezer()
getValueConverter
public abstract ValueConverter getValueConverter()
getExpressionEvaluator
public abstract ExpressionEvaluator getExpressionEvaluator()
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)
getSource
protected java.util.Iterator getSource(java.lang.String parameter)
- Returns an
Iterator
containing the values provided by the identified source binding.
- Parameters:
parameter
- The name of the source binding
- Returns:
- an iterator with the bound values. null if the parameter is not bound or the
conversion cannot be performed
getStoredData
protected java.util.Iterator getStoredData(IRequestCycle cycle,
java.lang.String name)
- Returns a list of the values stored as Hidden fields in the form. A conversion is performed
if the primary key of the value is stored.
- Parameters:
cycle
- The current request cyclename
- The name of the HTTP parameter whether the values
- Returns:
- an iterator with the values stored in the provided Hidden fields
storeSourceData
protected java.util.Iterator storeSourceData(IForm form,
java.lang.String name)
- Stores the provided data in the form and then returns the data as an iterator. If the primary
key of the value can be determined, then that primary key is saved instead.
- Parameters:
form
- The form where the data will be storedname
- The name under which the data will be stored
- Returns:
- an iterator with the bound values stored in the form
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