final MyfacesConfig currentInstance = MyfacesConfig
.getCurrentInstance(externalContext);
ScriptContext context = new ScriptContext(
currentInstance.isPrettyHtml());
context.prettyLine();
context.increaseIndent();
context.append("function setViewState() {\n");
context.append("\tvar state = '");
context.append(serializedState);