public class ERXWORepetition extends com.webobjects.appserver._private.WODynamicGroup
List
and arrays (e.g. String[]), in addition to
NSArray
and Vector
(which is a List
in 1.4). This
is listed as Radar #3325342 since June 2003.er.extensions.ERXWORepetition.raiseOnUnmatchedObject=true
-
an ERXWORepetition.UnmatchedObjectException
is thrownnotFoundMarker
is bound, that is used for the item in the repetition. This can be used to flag
special handling in the action method, possibly useful for Ajax requestser.extensions.ERXWORepetition.checkHashCodes=true
or on a
per-component basis by setting the checkHashCodes
binding to true or false.uniqueKey
and the value for that key is consistent across
the object instancesuniqueKey
does not have to return an integer.Name | Description |
---|---|
list | the array or list of items to iterate over |
item | the current item in the iteration |
count | the total number of items to iterate over |
index | the current index in the iteration |
uniqueKey | a String keypath on item (relative to item, not relative to the component) returning a value whose toString() is unique for this component |
checkHashCodes | if true, checks the validity of repetition references during the RR loop |
raiseOnUnmatchedObject | if true, an exception is thrown when the repetition does not find a matching object |
debugHashCodes | if true, prints out hashcodes for each entry in the repetition as it is traversed |
batchFetch | a comma-separated list of keypaths on the "list" array binding to batch fetch |
eoSupport | try to use globalIDs to determine the hashCode for EOs |
notFoundMarker | used for the item in the repetition if checkHashCodes is true, don't bind directly to null as that will be translated to false |
Name | Description |
---|---|
er.extensions.ERXWORepetition.checkHashCodes | add hash codes to element IDs so backtracking can be controlled |
er.extensions.ERXWORepetition.raiseOnUnmatchedObject | if an object wasn't found, raise an exception (if unset, the wrong object is used) |
er.extensions.ERXWORepetition.eoSupport | use hash code of GlobalID instead of object's hash code if it is an EO |
Modifier and Type | Class and Description |
---|---|
protected static class |
ERXWORepetition.Context
WOElements must be reentrant, so we need a context object or will have to add the parameters to every method.
|
static class |
ERXWORepetition.UnmatchedObjectException |
Modifier and Type | Field and Description |
---|---|
protected WOAssociation |
_batchFetch |
protected WOAssociation |
_checkHashCodes |
protected WOAssociation |
_count |
protected WOAssociation |
_debugHashCodes |
protected WOAssociation |
_eoSupport |
protected WOAssociation |
_index |
protected WOAssociation |
_item |
protected WOAssociation |
_list |
protected WOAssociation |
_notFoundMarker |
protected WOAssociation |
_raiseOnUnmatchedObject |
protected WOAssociation |
_uniqueKey |
_children
_ConstructorParameters
Constructor and Description |
---|
ERXWORepetition(String string,
NSDictionary<String,WOAssociation> associations,
WOElement woelement)
Designated Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_cleanupAfterIteration(int i,
WOContext wocontext,
WOComponent wocomponent)
Cleans the WOContext after the loop iteration.
|
protected int |
_count(ERXWORepetition.Context context,
WOComponent wocomponent) |
protected void |
_failCreation(String message)
Utility to throw an exception if the bindings are incomplete.
|
protected String |
_indexOfChosenItem(WORequest worequest,
WOContext wocontext) |
protected String |
_indexStringForSenderAndElement(String senderID,
String elementID)
Fills the context with the object given in the "list" binding.
|
protected void |
_prepareForIterationWithIndex(ERXWORepetition.Context context,
int index,
WOContext wocontext,
WOComponent wocomponent,
boolean checkHashCodes)
Prepares the WOContext for the loop iteration.
|
void |
appendToResponse(WOResponse woresponse,
WOContext wocontext) |
protected ERXWORepetition.Context |
createContext(WOComponent wocomponent) |
WOActionResults |
invokeAction(WORequest worequest,
WOContext wocontext) |
void |
takeValuesFromRequest(WORequest worequest,
WOContext wocontext) |
String |
toString() |
addChildElement, appendChildrenToResponse, childrenElements, EmptyGroup, hasChildrenElements, invokeChildrenAction, takeChildrenValuesFromRequest
protected WOAssociation _list
protected WOAssociation _item
protected WOAssociation _count
protected WOAssociation _index
protected WOAssociation _uniqueKey
protected WOAssociation _checkHashCodes
protected WOAssociation _raiseOnUnmatchedObject
protected WOAssociation _eoSupport
protected WOAssociation _debugHashCodes
protected WOAssociation _batchFetch
protected WOAssociation _notFoundMarker
public ERXWORepetition(String string, NSDictionary<String,WOAssociation> associations, WOElement woelement)
string
- associations
- woelement
- protected void _failCreation(String message)
message
- public String toString()
toString
in class com.webobjects.appserver._private.WODynamicGroup
protected void _prepareForIterationWithIndex(ERXWORepetition.Context context, int index, WOContext wocontext, WOComponent wocomponent, boolean checkHashCodes)
context
- index
- wocontext
- wocomponent
- checkHashCodes
- protected void _cleanupAfterIteration(int i, WOContext wocontext, WOComponent wocomponent)
i
- wocontext
- wocomponent
- protected String _indexStringForSenderAndElement(String senderID, String elementID)
senderID
- elementID
- protected int _count(ERXWORepetition.Context context, WOComponent wocomponent)
protected ERXWORepetition.Context createContext(WOComponent wocomponent)
public void takeValuesFromRequest(WORequest worequest, WOContext wocontext)
takeValuesFromRequest
in class com.webobjects.appserver._private.WODynamicGroup
public WOActionResults invokeAction(WORequest worequest, WOContext wocontext)
invokeAction
in class com.webobjects.appserver._private.WODynamicGroup
public void appendToResponse(WOResponse woresponse, WOContext wocontext)
appendToResponse
in class com.webobjects.appserver._private.WODynamicGroup
Copyright © 2002 – 2024 Project Wonder.