if(checkHashCodes(wocontext)) { if(object != null && hashCode != 0) { int objectHashCode = hashCodeForObject(object); if(objectHashCode != hashCode) { boolean found = false; for(int i = 0; i < context.count() && !found; i++) { Object o = context.objectAtIndex(i); int otherHashCode = hashCodeForObject(o); if(otherHashCode == hashCode) { object = o; index = i; found = true; } } if(!found) { if(raiseOnUnmatchedObject(wocontext)) { throw new UnmatchedObjectException(); } log.warn("Wrong object: " + objectHashCode + " vs " + hashCode); } else { log.info("Switched object: " + objectHashCode + " vs " + hashCode); } } } }
    public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) {        WOComponent wocomponent = wocontext.component();        Context context = createContext(wocomponent);                int count = _count(context, wocomponent);                WOActionResults woactionresults = null;        String indexString = _indexOfChosenItem(worequest, wocontext);        int index = indexString == null ? 0 : Integer.parseInt(indexString);        if(indexString != null) {            if (_item != null) {                Object object = context.objectAtIndex(index);                _item._setValueNoValidation(object, wocomponent);            }            if (_index != null) {                Integer integer = ERXConstant.integerForInt(index);                _index._setValueNoValidation(integer, wocomponent);            }            wocontext.appendElementIDComponent(indexString);            woactionresults = super.invokeAction(worequest, wocontext);            wocontext.deleteLastElementIDComponent();        } else {            int start = indexString == null ? 0 : index;            int end   = indexString == null ? count : (index + 1);                        for (int i = start; i < end && woactionresults == null; i++) {                _prepareForIterationWithIndex(context, i, wocontext, wocomponent);                woactionresults = super.invokeAction(worequest, wocontext);            }            if (count > 0) {                _cleanupAfterIteration(count, wocontext, wocomponent);            }        }        return woactionresults;    }