
Classes | |
| class | Context |
| class | UnmatchedObjectException |
Public Member Functions | |
| void | appendToResponse (WOResponse woresponse, WOContext wocontext) |
| ERXWORepetition (String string, NSDictionary associations, WOElement woelement) | |
| WOActionResults | invokeAction (WORequest worequest, WOContext wocontext) |
| void | takeValuesFromRequest (WORequest worequest, WOContext wocontext) |
| String | toString () |
Protected Member Functions | |
| void | _cleanupAfterIteration (int i, WOContext wocontext, WOComponent wocomponent) |
| int | _count (Context context, WOComponent wocomponent) |
| void | _failCreation (String message) |
| String | _indexOfChosenItem (WORequest worequest, WOContext wocontext) |
| String | _indexStringForSenderAndElement (String senderID, String elementID) |
| void | _prepareForIterationWithIndex (Context context, int index, WOContext wocontext, WOComponent wocomponent, boolean checkHashCodes) |
| Context | createContext (WOComponent wocomponent) |
Protected Attributes | |
| WOAssociation | _batchFetch |
| WOAssociation | _checkHashCodes |
| WOAssociation | _count |
| WOAssociation | _debugHashCodes |
| WOAssociation | _eoSupport |
| WOAssociation | _index |
| WOAssociation | _item |
| WOAssociation | _list |
| WOAssociation | _notFoundMarker |
| WOAssociation | _raiseOnUnmatchedObject |
| WOAssociation | _uniqueKey |
Private Member Functions | |
| boolean | checkHashCodes (WOComponent wocomponent) |
| boolean | eoSupport (WOComponent wocomponent) |
| int | hashCodeForObject (WOComponent component, Object object) |
| String | keyForObject (WOComponent component, Object object) |
| boolean | raiseOnUnmatchedObject (WOComponent wocomponent) |
Static Private Attributes | |
| static boolean | _checkHashCodesDefault = ERXProperties.booleanForKeyWithDefault("er.extensions.ERXWORepetition.checkHashCodes", ERXProperties.booleanForKey(ERXWORepetition.class.getName() + ".checkHashCodes")) |
| static boolean | _eoSupportDefault = ERXProperties.booleanForKeyWithDefault("er.extensions.ERXWORepetition.eoSupport", ERXProperties.booleanForKey(ERXWORepetition.class.getName() + ".eoSupport")) |
| static boolean | _raiseOnUnmatchedObjectDefault = ERXProperties.booleanForKeyWithDefault("er.extensions.ERXWORepetition.raiseOnUnmatchedObject", ERXProperties.booleanForKey(ERXWORepetition.class.getName() + ".raiseOnUnmatchedObject")) |
| static final Logger | log = Logger.getLogger(ERXWORepetition.class) |
er.extensions.ERXWORepetition.raiseOnUnmatchedObject=true - an ERXWORepetition.UnmatchedObjectException is thrown notFoundMarker 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 requests er.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 instances
As an alternative to the default use of System.identityHashCode to unique your items, you can set the binding "uniqueKey" to be a string keypath on your items that can return a unique key for the item. For instance, if you are using ERXGenericRecord, you can set uniqueKey = "rawPrimaryKey"; if your EO has an integer primary key, and this will make the uniquing value be the primary key instead of the hash code. While this reveals the primary keys of your items, the set of possible valid matches is still restricted to only those that were in the list to begin with, so no additional capabilities are available to users. uniqueKey does not have to return an integer.
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
| ERXWORepetition | ( | String | string, | |
| NSDictionary | associations, | |||
| WOElement | woelement | |||
| ) |
Designated Constructor. Gets called by the template parser. Checks if the bindings are valid.
| void _cleanupAfterIteration | ( | int | i, | |
| WOContext | wocontext, | |||
| WOComponent | wocomponent | |||
| ) | [protected] |
Cleans the WOContext after the loop iteration.
| void _failCreation | ( | String | message | ) | [protected] |
Utility to throw an exception if the bindings are incomplete.
| String _indexOfChosenItem | ( | WORequest | worequest, | |
| WOContext | wocontext | |||
| ) | [protected] |
Fills the context with the object given in the "list" binding.
| void _prepareForIterationWithIndex | ( | Context | context, | |
| int | index, | |||
| WOContext | wocontext, | |||
| WOComponent | wocomponent, | |||
| boolean | checkHashCodes | |||
| ) | [protected] |
Prepares the WOContext for the loop iteration.
| checkHashCodes |
| void appendToResponse | ( | WOResponse | woresponse, | |
| WOContext | wocontext | |||
| ) |
| boolean checkHashCodes | ( | WOComponent | wocomponent | ) | [private] |
| Context createContext | ( | WOComponent | wocomponent | ) | [protected] |
| boolean eoSupport | ( | WOComponent | wocomponent | ) | [private] |
| int hashCodeForObject | ( | WOComponent | component, | |
| Object | object | |||
| ) | [private] |
| WOActionResults invokeAction | ( | WORequest | worequest, | |
| WOContext | wocontext | |||
| ) |
| String keyForObject | ( | WOComponent | component, | |
| Object | object | |||
| ) | [private] |
| boolean raiseOnUnmatchedObject | ( | WOComponent | wocomponent | ) | [private] |
| void takeValuesFromRequest | ( | WORequest | worequest, | |
| WOContext | wocontext | |||
| ) |
| String toString | ( | ) |
Human readable description.
WOAssociation _batchFetch [protected] |
WOAssociation _checkHashCodes [protected] |
boolean _checkHashCodesDefault = ERXProperties.booleanForKeyWithDefault("er.extensions.ERXWORepetition.checkHashCodes", ERXProperties.booleanForKey(ERXWORepetition.class.getName() + ".checkHashCodes")) [static, private] |
WOAssociation _count [protected] |
WOAssociation _debugHashCodes [protected] |
WOAssociation _eoSupport [protected] |
boolean _eoSupportDefault = ERXProperties.booleanForKeyWithDefault("er.extensions.ERXWORepetition.eoSupport", ERXProperties.booleanForKey(ERXWORepetition.class.getName() + ".eoSupport")) [static, private] |
WOAssociation _index [protected] |
WOAssociation _item [protected] |
WOAssociation _list [protected] |
WOAssociation _notFoundMarker [protected] |
WOAssociation _raiseOnUnmatchedObject [protected] |
boolean _raiseOnUnmatchedObjectDefault = ERXProperties.booleanForKeyWithDefault("er.extensions.ERXWORepetition.raiseOnUnmatchedObject", ERXProperties.booleanForKey(ERXWORepetition.class.getName() + ".raiseOnUnmatchedObject")) [static, private] |
WOAssociation _uniqueKey [protected] |
1.5.8