public void flush() throws IOException { // Important - causes any cookies stored to properly be written out before the // rest of the response starts being written - see TAPESTRY-825 _writer.flush(); if (!_responseStarted) beginResponse(); }
public void flush() throws IOException { // Important - causes any cookies stored to properly be written out before the // rest of the response starts being written - see TAPESTRY-825 _writer.flush(); if (!_responseStarted) beginResponse(); }
/** * * {@inheritDoc} */ public IMarkupWriter getWriter(String id, String type) { Defense.notNull(id, "id can't be null"); if (!_responseStarted) beginResponse(); IMarkupWriter w = (IMarkupWriter)_writers.get(id); if (w != null) return w; // Make component write to a "nested" writer // so that element begin/ends don't conflict // with xml element response begin/ends. This is very // important. IMarkupWriter nestedWriter = _writer.getNestedWriter(); nestedWriter.begin("response"); nestedWriter.attribute("id", id); if (type != null) nestedWriter.attribute("type", type); _writers.put(id, nestedWriter); return nestedWriter; }
/** * * {@inheritDoc} */ public IMarkupWriter getWriter(String id, String type) { Defense.notNull(id, "id can't be null"); if (!_responseStarted) beginResponse(); IMarkupWriter w = (IMarkupWriter)_writers.get(id); if (w != null) return w; // Make component write to a "nested" writer // so that element begin/ends don't conflict // with xml element response begin/ends. This is very // important. IMarkupWriter nestedWriter = _writer.getNestedWriter(); nestedWriter.begin("response"); nestedWriter.attribute("id", id); if (type != null) nestedWriter.attribute("type", type); _writers.put(id, nestedWriter); return nestedWriter; }