org.openfaces.component.util
Class ForEach

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.openfaces.component.OUIComponentBase
              extended by org.openfaces.component.OUIObjectIteratorBase
                  extended by org.openfaces.component.util.ForEach
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, OUIComponent, OUIObjectIterator

public class ForEach
extends OUIObjectIteratorBase

The ForEach component is an iterator component that renders the specified set of components multiple times based on its parameters.


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Fields inherited from interface org.openfaces.component.OUIObjectIterator
OBJECT_ID_SEPARATOR
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
ForEach()
           
 
Method Summary
 void broadcast(javax.faces.event.FacesEvent event)
           
 java.lang.Integer getBegin()
           
 java.lang.Integer getEnd()
           
 java.lang.String getFamily()
           
 java.lang.Object getItems()
           
 java.lang.String getObjectId()
           
 java.lang.Integer getStep()
           
 java.lang.String getVar()
           
 java.lang.String getVarStatus()
           
 java.lang.String getWrapperTagName()
           
 boolean hasNext()
          Indicate is it possible to continue the iteration or not.
 java.lang.Object next()
          Perform one step of iteration.
 void processDecodes(javax.faces.context.FacesContext faces)
           
 void processUpdates(javax.faces.context.FacesContext faces)
           
 void processValidators(javax.faces.context.FacesContext faces)
           
 void queueEvent(javax.faces.event.FacesEvent event)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setBegin(java.lang.Integer beginIndex)
           
 void setEnd(java.lang.Integer endIndex)
           
 void setItems(java.lang.Object items)
           
 void setObjectId(java.lang.String objectId)
          Selects an object with the specified id in this component.
 void setStep(java.lang.Integer step)
           
 void setVar(java.lang.String var)
           
 void setVarStatus(java.lang.String varStatus)
           
 void setWrapperTagName(java.lang.String wrapperTagName)
           
 
Methods inherited from class org.openfaces.component.OUIObjectIteratorBase
getClientId, invokeOnComponent, startObjectIterationAndRendering, stopObjectIterationAndRendering, visitTree
 
Methods inherited from class org.openfaces.component.OUIComponentBase
getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRolloverClass, getRolloverStyle, getStyle, getStyleClass, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRolloverClass, setRolloverStyle, setStyle, setStyleClass
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getDefaultEventName, getEventNames, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getValueExpression, initialStateMarked, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openfaces.component.OUIComponent
getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRolloverClass, getRolloverStyle, getStyle, getStyleClass, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRolloverClass, setRolloverStyle, setStyle, setStyleClass
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

ForEach

public ForEach()
Method Detail

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent
Returns:
"org.openfaces.ForEach"
See Also:
UIComponent

hasNext

public boolean hasNext()
Indicate is it possible to continue the iteration or not.

Returns:
true if is it possible to continue the iteration or false otherwise.

next

public java.lang.Object next()
Perform one step of iteration.

Returns:
current item of value-bound collection as an java.lang.Object or null if no value-bound data collection is specified.

setObjectId

public void setObjectId(java.lang.String objectId)
Description copied from interface: OUIObjectIterator
Selects an object with the specified id in this component. The semantics of handling the current object is specific to each particular component, and the current object typically points to a data entry currently being rendered, or an entry that generated the server action that is being processed.

Specified by:
setObjectId in interface OUIObjectIterator
Overrides:
setObjectId in class OUIObjectIteratorBase
Parameters:
objectId - id of an object to be selected

getObjectId

public java.lang.String getObjectId()
Returns:
the identifier of the object currently selected in this component.
See Also:
OUIObjectIterator.setObjectId(java.lang.String)

processDecodes

public void processDecodes(javax.faces.context.FacesContext faces)
Overrides:
processDecodes in class javax.faces.component.UIComponentBase

processUpdates

public void processUpdates(javax.faces.context.FacesContext faces)
Overrides:
processUpdates in class javax.faces.component.UIComponentBase

processValidators

public void processValidators(javax.faces.context.FacesContext faces)
Overrides:
processValidators in class javax.faces.component.UIComponentBase

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class OUIObjectIteratorBase

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class OUIObjectIteratorBase

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Overrides:
queueEvent in class OUIObjectIteratorBase

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class OUIObjectIteratorBase
Throws:
javax.faces.event.AbortProcessingException

getItems

public java.lang.Object getItems()

setItems

public void setItems(java.lang.Object items)

getBegin

public java.lang.Integer getBegin()

setBegin

public void setBegin(java.lang.Integer beginIndex)

getEnd

public java.lang.Integer getEnd()

setEnd

public void setEnd(java.lang.Integer endIndex)

getStep

public java.lang.Integer getStep()

setStep

public void setStep(java.lang.Integer step)

getVar

public java.lang.String getVar()

setVar

public void setVar(java.lang.String var)

getVarStatus

public java.lang.String getVarStatus()

setVarStatus

public void setVarStatus(java.lang.String varStatus)

getWrapperTagName

public java.lang.String getWrapperTagName()

setWrapperTagName

public void setWrapperTagName(java.lang.String wrapperTagName)


Copyright © 1998-2010 TeamDev Ltd. All Rights Reserved.