return null;
}
Object result;
String viewId = context.getViewRoot().getViewId();
StateManagementStrategy strategy = null;
ViewDeclarationLanguage vdl =
context.getApplication().getViewHandler().
getViewDeclarationLanguage(context, viewId);
if (vdl != null) {
strategy = vdl.getStateManagementStrategy(context, viewId);
}
Map<Object, Object> contextAttributes = context.getAttributes();
try {
contextAttributes.put(StateManager.IS_SAVING_STATE, Boolean.TRUE);
if (null != strategy) {
result = strategy.saveView(context);
} else {
// honor the requirement to check for id uniqueness
Util.checkIdUniqueness(context,
viewRoot,
new HashSet<String>(viewRoot.getChildCount() << 1));