public static int renderSCR(StaticComponentRenderer scr, XMLLumpMMap collecteds, TagRenderContext trc) { if (scr instanceof BasicSCR) { return ((BasicSCR) scr).render(trc); } else { CollectingSCR collector = (CollectingSCR) scr; String[] tocollect = collector.getCollectingNames(); XMLLumpList collected = new XMLLumpList(); for (int i = 0; i < tocollect.length; ++i) { XMLLumpList thiscollect = collecteds.headsForID(tocollect[i]); if (thiscollect != null) { collected.addAll(thiscollect); } } return collector.render(collected, trc); } }