@Override public void close() { // up until now, no ResourceReference objects have been passed to the real response. we need // to group them into top-level groups and then render those groups SortedMap<K, R> map = new TreeMap<K, R>(getGroupingKeyComparator()); for (ResourceReferenceAndStringData ref : topLevelReferences) { K key = newGroupingKey(ref); R coll = map.get(key); if (coll == null) { map.put(key, coll = newResourceReferenceCollection()); } coll.add(ref); } // now, render our groups to the real response Set<ResourceReferenceAndStringData> alreadyRendered = new LinkedHashSet<ResourceReferenceAndStringData>(); for (Entry<K, R> entry : map.entrySet()) { renderCollection(alreadyRendered, entry.getKey(), entry.getValue()); } onAllCollectionsRendered(topLevelReferences); // finally, we close the real response super.close(); }
@Override public void close() { // write the stuff that was actually supposed to be in the header to the // response, which is used by the built-in HtmlHeaderContainer to get // its contents CharSequence headerContent = getContent(headerFilterName); RequestCycle.get().getResponse().write(headerContent); // must make sure our super (and with it, the wrapped response) get closed: super.close(); }
@Override public void close() { // write the stuff that was actually supposed to be in the header to the // response, which is used by the built-in HtmlHeaderContainer to get // its contents CharSequence headerContent = getContent(headerFilterName); RequestCycle.get().getResponse().write(headerContent); // must make sure our super (and with it, the wrapped response) get closed: super.close(); }
@Override public void close() { renderHeaderItems(); if (RequestCycle.get().find(IPartialPageRequestHandler.class).isPresent()) { renderSeparateEventScripts(); } else { renderCombinedEventScripts(); } super.close(); }
@Override public void close() { // write the stuff that was actually supposed to be in the header to the // response, which is used by the built-in HtmlHeaderContainer to get // its contents CharSequence headerContent = getContent(headerFilterName); RequestCycle.get().getResponse().write(headerContent); // must make sure our super (and with it, the wrapped response) get closed: super.close(); }
@Override public void close() { renderHeaderItems(); if (RequestCycle.get().find(IPartialPageRequestHandler.class).isPresent()) { renderSeparateEventScripts(); } else { renderCombinedEventScripts(); } super.close(); }