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 com.webobjects.appserver.WOAssociation |
_batchFetch |
protected com.webobjects.appserver.WOAssociation |
_checkHashCodes |
protected com.webobjects.appserver.WOAssociation |
_count |
protected com.webobjects.appserver.WOAssociation |
_debugHashCodes |
protected com.webobjects.appserver.WOAssociation |
_eoSupport |
protected com.webobjects.appserver.WOAssociation |
_index |
protected com.webobjects.appserver.WOAssociation |
_item |
protected com.webobjects.appserver.WOAssociation |
_list |
protected com.webobjects.appserver.WOAssociation |
_notFoundMarker |
protected com.webobjects.appserver.WOAssociation |
_raiseOnUnmatchedObject |
protected com.webobjects.appserver.WOAssociation |
_uniqueKey |
Constructor and Description |
---|
ERXWORepetition(String string,
NSDictionary<String,com.webobjects.appserver.WOAssociation> associations,
com.webobjects.appserver.WOElement woelement)
Designated Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_cleanupAfterIteration(int i,
com.webobjects.appserver.WOContext wocontext,
com.webobjects.appserver.WOComponent wocomponent)
Cleans the WOContext after the loop iteration.
|
protected int |
_count(ERXWORepetition.Context context,
com.webobjects.appserver.WOComponent wocomponent) |
protected void |
_failCreation(String message)
Utility to throw an exception if the bindings are incomplete.
|
protected String |
_indexOfChosenItem(com.webobjects.appserver.WORequest worequest,
com.webobjects.appserver.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,
com.webobjects.appserver.WOContext wocontext,
com.webobjects.appserver.WOComponent wocomponent,
boolean checkHashCodes)
Prepares the WOContext for the loop iteration.
|
void |
appendToResponse(com.webobjects.appserver.WOResponse woresponse,
com.webobjects.appserver.WOContext wocontext) |
protected ERXWORepetition.Context |
createContext(com.webobjects.appserver.WOComponent wocomponent) |
com.webobjects.appserver.WOActionResults |
invokeAction(com.webobjects.appserver.WORequest worequest,
com.webobjects.appserver.WOContext wocontext) |
void |
takeValuesFromRequest(com.webobjects.appserver.WORequest worequest,
com.webobjects.appserver.WOContext wocontext) |
String |
toString() |
protected com.webobjects.appserver.WOAssociation _list
protected com.webobjects.appserver.WOAssociation _item
protected com.webobjects.appserver.WOAssociation _count
protected com.webobjects.appserver.WOAssociation _index
protected com.webobjects.appserver.WOAssociation _uniqueKey
protected com.webobjects.appserver.WOAssociation _checkHashCodes
protected com.webobjects.appserver.WOAssociation _raiseOnUnmatchedObject
protected com.webobjects.appserver.WOAssociation _eoSupport
protected com.webobjects.appserver.WOAssociation _debugHashCodes
protected com.webobjects.appserver.WOAssociation _batchFetch
protected com.webobjects.appserver.WOAssociation _notFoundMarker
public ERXWORepetition(String string, NSDictionary<String,com.webobjects.appserver.WOAssociation> associations, com.webobjects.appserver.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, com.webobjects.appserver.WOContext wocontext, com.webobjects.appserver.WOComponent wocomponent, boolean checkHashCodes)
context
- index
- wocontext
- wocomponent
- checkHashCodes
- protected void _cleanupAfterIteration(int i, com.webobjects.appserver.WOContext wocontext, com.webobjects.appserver.WOComponent wocomponent)
i
- wocontext
- wocomponent
- protected String _indexStringForSenderAndElement(String senderID, String elementID)
senderID
- elementID
- protected String _indexOfChosenItem(com.webobjects.appserver.WORequest worequest, com.webobjects.appserver.WOContext wocontext)
protected int _count(ERXWORepetition.Context context, com.webobjects.appserver.WOComponent wocomponent)
protected ERXWORepetition.Context createContext(com.webobjects.appserver.WOComponent wocomponent)
public void takeValuesFromRequest(com.webobjects.appserver.WORequest worequest, com.webobjects.appserver.WOContext wocontext)
takeValuesFromRequest
in class com.webobjects.appserver._private.WODynamicGroup
public com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest worequest, com.webobjects.appserver.WOContext wocontext)
invokeAction
in class com.webobjects.appserver._private.WODynamicGroup
public void appendToResponse(com.webobjects.appserver.WOResponse woresponse, com.webobjects.appserver.WOContext wocontext)
appendToResponse
in class com.webobjects.appserver._private.WODynamicGroup
Copyright © 2002 – 2020 Project Wonder.