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));