org.openfaces.component.util
Class ForEach

java.lang.Object
  extended by UIComponentBase
      extended by org.openfaces.component.OUIComponentBase
          extended by org.openfaces.component.OUIObjectIteratorBase
              extended by org.openfaces.component.util.ForEach
All Implemented Interfaces:
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 interface org.openfaces.component.OUIObjectIterator
OBJECT_ID_SEPARATOR
 
Constructor Summary
ForEach()
           
 
Method Summary
 void broadcast(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(FacesContext faces)
           
 void processUpdates(FacesContext faces)
           
 void processValidators(FacesContext faces)
           
 void queueEvent(FacesEvent event)
           
 void restoreState(FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(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
 
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 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()
Returns:
"org.openfaces.ForEach"
See Also:
javax.faces.component.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.

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(FacesContext faces)

processUpdates

public void processUpdates(FacesContext faces)

processValidators

public void processValidators(FacesContext faces)

saveState

public java.lang.Object saveState(FacesContext context)
Overrides:
saveState in class OUIObjectIteratorBase

restoreState

public void restoreState(FacesContext context,
                         java.lang.Object state)
Overrides:
restoreState in class OUIObjectIteratorBase

queueEvent

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

broadcast

public void broadcast(FacesEvent event)
               throws AbortProcessingException
Overrides:
broadcast in class OUIObjectIteratorBase
Throws:
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-2009 TeamDev Ltd. All Rights Reserved.