}
// For requests intended to produce a partial response, we need prohibit
// writing any content outside of the view itself (f:view).
PartialViewContext partialViewContext = facesContext.getPartialViewContext();
if (partialViewContext.isPartialRequest()) {
OnOffResponseWrapper onOffResponse = new OnOffResponseWrapper(facesContext);
onOffResponse.setEnabled(false);
}
try {
ViewHandler vh = facesContext.getApplication().getViewHandler();