* @return the view root.
* @see {@link StateManager#restoreView(javax.faces.context.FacesContext, String, String)}
*/
public UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId) {
UIViewRoot result;
StateManagementStrategy strategy = null;
ViewDeclarationLanguage vdl =
context.getApplication().getViewHandler().
getViewDeclarationLanguage(context, viewId);
if (vdl != null) {
strategy = vdl.getStateManagementStrategy(context, viewId);
}
if (strategy != null) {
result = strategy.restoreView(context, viewId, renderKitId);
} else {
strategy = new JspStateManagementStrategy(context);
result = strategy.restoreView(context, viewId, renderKitId);
}
return result;
}