Examples of restoreState()


Examples of javax.faces.component.UIComponent.restoreState()

                    component.markInitialState();
                    component.restoreState(facesContext, childState);
                }
                else
                {
                    component.restoreState(facesContext, childState);
                    component.markInitialState();
                }
               
                Iterator<UIComponent> childsIterator;
                if (restoreChildFacets)
View Full Code Here

Examples of javax.faces.component.UIComponent.EventListenerWrapper.restoreState()

       
        EventListenerWrapper wrapper2 = new EventListenerWrapper(component, listener);
        wrapper.markInitialState();
        //For restore we need to setup the context first
        component.pushComponentToEL(facesContext, component);
        wrapper2.restoreState(facesContext, state);
        component.popComponentFromEL(facesContext);
       
        assertNotNull(wrapper2.getComponentSystemEventListener());
        assertEquals(wrapper.getComponentSystemEventListener(), wrapper2.getComponentSystemEventListener());
    }
View Full Code Here

Examples of javax.faces.component.UIForm.restoreState()

        UIForm form = new UIForm();
        form.getAttributes().put("foo", "bar");
        form.setPrependId(true);
        Object state = form.saveState(facesContext);
        form = new UIForm();
        form.restoreState(facesContext, state);
        assertTrue("bar".equals(form.getAttributes().get("foo")));
        assertTrue(form.isPrependId());
    }

View Full Code Here

Examples of javax.faces.component.UIViewRoot.restoreState()

        UIViewRoot newRoot = (UIViewRoot)
          fc.getApplication().createComponent(UIViewRoot.COMPONENT_TYPE);
       
        // must call restoreState so that we setup attributes, listeners,
        // uniqueIds, etc ...
        newRoot.restoreState(fc, viewRootState);

        // we need to use a temp list because as a side effect of
        // adding a child to a UIComponent, that child is removed from
        // the parent UIComponent. So the following will break:
        // newRoot.getChildren().addAll(root.getChildren());
View Full Code Here

Examples of javax.faces.component.UIViewRoot.restoreState()

                    if (state != null) {
                        String cid = viewRoot.getClientId(context);
                        Object stateObj = state.get(cid);
                        if (stateObj != null) {
                            context.getAttributes().put("com.sun.faces.application.view.restoreViewScopeOnly", true);
                            viewRoot.restoreState(context, stateObj);
                            context.getAttributes().remove("com.sun.faces.application.view.restoreViewScopeOnly");
                        }
                    }
                }
                context.setProcessingEvents(true);
View Full Code Here

Examples of javax.faces.component.UIViewRoot.restoreState()

                    if (state != null) {
                        String cid = viewRoot.getClientId(context);
                        Object stateObj = state.get(cid);
                        if (stateObj != null) {
                            context.getAttributes().put("com.sun.faces.application.view.restoreViewScopeOnly", true);
                            viewRoot.restoreState(context, stateObj);
                            context.getAttributes().remove("com.sun.faces.application.view.restoreViewScopeOnly");
                        }
                    }
                }
                context.setProcessingEvents(true);
View Full Code Here

Examples of javax.faces.component.UIViewRoot.restoreState()

        UIViewRoot newRoot = (UIViewRoot)
          fc.getApplication().createComponent(UIViewRoot.COMPONENT_TYPE);
       
        // must call restoreState so that we setup attributes, listeners,
        // uniqueIds, etc ...
        newRoot.restoreState(fc, viewRootState);

        // we need to use a temp list because as a side effect of
        // adding a child to a UIComponent, that child is removed from
        // the parent UIComponent. So the following will break:
        // newRoot.getChildren().addAll(root.getChildren());
View Full Code Here

Examples of javax.faces.component.UIViewRoot.restoreState()

        }


        // must call restoreState so that we setup attributes, listeners,
        // uniqueIds, etc ...
        newRoot.restoreState(fc, viewRootState);

        // we need to use a temp list because as a side effect of
        // adding a child to a UIComponent, that child is removed from
        // the parent UIComponent. So the following will break:
        // newRoot.getChildren().addAll(root.getChildren());
View Full Code Here

Examples of javax.faces.component.UIViewRoot.restoreState()

        }

       
        // must call restoreState so that we setup attributes, listeners,
        // uniqueIds, etc ...
        newRoot.restoreState(fc, viewRootState);

        // we need to use a temp list because as a side effect of
        // adding a child to a UIComponent, that child is removed from
        // the parent UIComponent. So the following will break:
        // newRoot.getChildren().addAll(root.getChildren());
View Full Code Here

Examples of javax.faces.component.UIViewRoot.restoreState()

        }

       
        // must call restoreState so that we setup attributes, listeners,
        // uniqueIds, etc ...
        newRoot.restoreState(fc, viewRootState);

        // we need to use a temp list because as a side effect of
        // adding a child to a UIComponent, that child is removed from
        // the parent UIComponent. So the following will break:
        // newRoot.getChildren().addAll(root.getChildren());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.