public void writeState(FacesContext context) throws IOException { if (handledByFacelets(context.getViewRoot().getViewId())) { // Tell the StateWriter that we're about to write state StateWriter.getCurrentInstance().writingState(); // Write the STATE_KEY out. Unfortunately, this will // be wasteful for pure server-side state managers where nothing // is actually written into the output, but this cannot // programatically be discovered context.getResponseWriter().write(STATE_KEY); } else { this.parent.writeState(context); } }
if (!this.buildBeforeRestore || !handledByFacelets(viewId)) { return this.parent.restoreView(context, viewId);
if (!handledByFacelets(viewToRender.getViewId())) { this.parent.renderView(context, viewToRender); return;