viewRoot.visitTree(visitContext, new VisitCallback() {
public VisitResult visit(VisitContext context, UIComponent target) {
VisitResult result = VisitResult.ACCEPT;
Object stateObj;
if (!target.isTransient()) {
if (stateContext.componentAddedDynamically(target)) {
stateObj = new StateHolderSaver(finalContext, target);
Map<String, ComponentStruct> dynamicAdds = stateContext.getDynamicAdds();
assert(null != dynamicAdds);
String clientId = target.getClientId(finalContext);
if (!dynamicAdds.containsKey(clientId)) {