// When partial state saving is not used, createView() is not called. To ensure
// everything is in place it is necessary to calculate the resource library
// contracts and set them into facesContext.
ViewDeclarationLanguage vdl = context.getApplication().getViewHandler().
getViewDeclarationLanguage(context, viewId);
List<String> contracts = vdl.calculateResourceLibraryContracts(
context, viewId);
context.setResourceLibraryContracts(contracts);
// JSF 2.2 stateless views
// We need to check if the incoming view is stateless or not and if that so rebuild it here