public void processRender(UIStandaloneApplication uicomponent, WebuiRequestContext context) throws Exception {
PortalRequestContext prc = (PortalRequestContext) context;
OutputStream responseOutputStream = prc.getResponse().getOutputStream();
PortalPrinter parentWriter = new PortalPrinter(responseOutputStream, true, 5000);
PortalPrinter childWriter = new PortalPrinter(responseOutputStream, true, 25000, true);
context.setWriter(childWriter);
processRender(uicomponent, context, "system:/groovy/portal/webui/workspace/UIStandaloneApplicationChildren.gtmpl");
context.setWriter(parentWriter);
processRender(uicomponent, context, "system:/groovy/portal/webui/workspace/UIStandaloneApplication.gtmpl");
try {
// flush the parent writer to the output stream so that we are really to accept the child content
parentWriter.flushOutputStream();
// now that the parent has been flushed, we can flush the contents of the child to the output
childWriter.flushOutputStream();
} catch (IOException ioe) {
// We want to ignore the ClientAbortException since this is caused by the users
// browser closing the connection and is not something we should be logging.
if (!ioe.getClass().toString().contains("ClientAbortException")) {
throw ioe;