}  if (count > 0) { _cleanupAfterIteration(count, wocontext, wocomponent);
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); }
    public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) {        WOComponent wocomponent = wocontext.component();        Context context = createContext(wocomponent);                int count = _count(context, wocomponent);                String indexString = _indexOfChosenItem(worequest, wocontext);        int index = indexString == null ? 0 : Integer.parseInt(indexString);        int start = indexString == null ? 0 : index;        int end   = indexString == null ? count : (index + 1);                WOActionResults woactionresults = null;                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;    }