ForBean
public abstract class Foreach extends AbstractComponent
While the component is rendering, the property value
(accessed as
components.foreach.value
is set to each successive value from the source,
and the property index
is set to each successive index into the source
(starting with zero).
Constructor and Description |
---|
Foreach()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanupAfterRender(IRequestCycle cycle)
Deprecated.
Invoked by
AbstractComponent.render(IMarkupWriter, IRequestCycle) after the component renders. |
abstract java.lang.String |
getElement()
Deprecated.
|
int |
getIndex()
Deprecated.
The index number, within the
source , of the the current value. |
protected java.util.Iterator |
getSourceData()
Deprecated.
Gets the source binding and returns an
Iterator representing the values identified by
the source. |
java.lang.Object |
getValue()
Deprecated.
Returns the most recent value extracted from the source parameter.
|
abstract ValueConverter |
getValueConverter()
Deprecated.
|
protected void |
prepareForRender(IRequestCycle cycle)
Deprecated.
Invoked by
AbstractComponent.render(IMarkupWriter, IRequestCycle) to prepare the component to render. |
protected void |
renderComponent(IMarkupWriter writer,
IRequestCycle cycle)
Deprecated.
Gets the source binding and iterates through its values.
|
abstract void |
setIndexParameter(int value)
Deprecated.
|
abstract void |
setValueParameter(java.lang.Object value)
Deprecated.
|
addAsset, addBody, addComponent, checkActiveLock, 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, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
public Foreach()
protected java.util.Iterator getSourceData()
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.
protected void prepareForRender(IRequestCycle cycle)
AbstractComponent
AbstractComponent.render(IMarkupWriter, IRequestCycle)
to prepare the component to render.
This implementation sets JavaBeans properties from matching bound parameters. This
implementation does nothing.prepareForRender
in class AbstractComponent
protected void cleanupAfterRender(IRequestCycle cycle)
AbstractComponent
AbstractComponent.render(IMarkupWriter, IRequestCycle)
after the component renders. This
implementation does nothing.cleanupAfterRender
in class AbstractComponent
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
renderComponent
in class AbstractComponent
public java.lang.Object getValue()
org.apache.tapestry.ApplicationRuntimeException
- if the Foreach is not currently rendering.public int getIndex()
source
, of the the current value.org.apache.tapestry.ApplicationRuntimeException
- if the Foreach is not currently rendering.public abstract java.lang.String getElement()
public abstract void setIndexParameter(int value)
public abstract void setValueParameter(java.lang.Object value)
public abstract ValueConverter getValueConverter()