public int doStartTag() { index += begin; Collection children; try { children = getCollection(); } catch (PathNotFoundException e) { // ok, this is normal return SKIP_BODY; } catch (AccessDeniedException e) { log.debug(e.getMessage()); return SKIP_BODY; } catch (RepositoryException e) { log.error(e.getMessage(), e); return SKIP_BODY; } this.size = children.size(); this.savePrevState(); pageContext.setAttribute(ContentNodeIterator.SIZE, new Integer(size), PageContext.REQUEST_SCOPE); pageContext.setAttribute(ContentNodeIterator.CURRENT_INDEX, new Integer(this.count), PageContext.REQUEST_SCOPE); pageContext.setAttribute(ContentNodeIterator.CONTENT_NODE_COLLECTION_NAME, getContentNodeCollectionName(), PageContext.REQUEST_SCOPE); Resource.setLocalContentNodeCollectionName(getContentNodeCollectionName()); // // // handle first node different // // pageContext.setAttribute( ContentNodeIterator.CURRENT_INDEX, new Integer(this.count), PageContext.REQUEST_SCOPE); if (StringUtils.isNotEmpty(varStatus)) { pageContext.setAttribute(varStatus, getLoopStatus()); } this.contentNodeIterator = children.iterator(); for (int i = 0; i <= begin; i++) { if (this.contentNodeIterator.hasNext()) { current = this.contentNodeIterator.next(); } else { // // // skip if begin is greater than amount of nodes... // // return SKIP_BODY; } } // // // ... else set Resource and go ahead with next node // // Resource.setLocalContentNode((Content) current); this.count++; return true ? EVAL_BODY_INCLUDE : SKIP_BODY; }