Home » tapestry-src-5.0.19 » org.apache.tapestry5.corelib.components » [javadoc | source]
org.apache.tapestry5.corelib.components
public class: Loop [javadoc | source]
java.lang.Object
   org.apache.tapestry5.corelib.components.Loop
Basic looping class; loops over a number of items (provided by its source parameter), rendering its body for each one. It turns out that gettting the component to not store its state in the Form is very tricky and, in fact, a series of commands for starting and ending heartbeats, and advancing through the iterator, are still stored. For a non-volatile Loop inside the form, the Loop stores a series of commands that start and end heartbeats and store state (either as full objects when there the encoder parameter is not bound, or as client-side objects when there is an encoder).
Nested Class Summary:
static class  Loop.RestoreState  Restores a state value (this is the case when there is no encoder and the complete value is stored). 
static class  Loop.RestoreStateViaEncodedPrimaryKey  Restores the value using a stored primary key via {@link PrimaryKeyEncoder#toValue(Serializable)}. 
static class  Loop.PrepareForKeys  Stores a list of keys to be passed to {@link PrimaryKeyEncoder#prepareForKeys(List)}. 
Method from org.apache.tapestry5.corelib.components.Loop Summary:
after,   begin,   cleanupRender,   defaultElement,   getIndex,   getValue,   setHeartbeat,   setSource,   setup
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tapestry5.corelib.components.Loop Detail:
 boolean after(MarkupWriter writer) 
    Ends the current heartbeat.
  void begin(MarkupWriter writer) 
    Begins a new heartbeat.
 Block cleanupRender() 
    Returns the empty block, or null, after the render has finished. It will only be the empty block (which itself may be null) if the source was null or empty.
 String defaultElement() 
 int getIndex() 
 Object getValue() 
  void setHeartbeat(Heartbeat heartbeat) 
  void setSource(Iterable<?> source) 
 boolean setup()