public abstract class Loop extends AbstractRepeater
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Constructor and Description |
|---|
Loop(String id,
IModel<Integer> model)
Construct.
|
Loop(String id,
int iterations)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getIterations() |
protected LoopItem |
newItem(int iteration)
Create a new LoopItem for loop at iteration.
|
protected void |
onPopulate()
Callback to let the repeater know it should populate itself with its items.
|
protected abstract void |
populateItem(LoopItem item)
Populates this loop item.
|
protected void |
renderChild(Component child)
Render a single child.
|
protected void |
renderItem(LoopItem item)
Renders this loop iteration.
|
protected Iterator<Component> |
renderIterator()
Returns an iterator for the collection of child components to be rendered.
|
dequeue, getMarkup, onBeforeRender, onRendergetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onDetach, onInitialize, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrappublic Loop(String id, int iterations)
id - See Componentiterations - max index of the loopComponent.Component(String, IModel)public Loop(String id, IModel<Integer> model)
id - See Componentmodel - Must contain a Integer model objectComponent.Component(String, IModel)public final int getIterations()
protected final void onPopulate()
AbstractRepeateronPopulate in class AbstractRepeaterComponent.onBeforeRender()protected LoopItem newItem(int iteration)
iteration - iteration in the loopprotected Iterator<Component> renderIterator()
AbstractRepeaterrenderIterator in class AbstractRepeaterAbstractRepeater.renderIterator()protected abstract void populateItem(LoopItem item)
item - The iteration of the loopprotected final void renderChild(Component child)
AbstractRepeaterrenderChild in class AbstractRepeaterchild - protected void renderItem(LoopItem item)
item - The loop iterationCopyright © 2006–2014 Apache Software Foundation. All rights reserved.