Package javax.faces.component.UIComponent

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


        UIComponent component = new UIOutput();
        ComponentSystemEventListener listener = new MyNonSerializableListener();       
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, listener);
       
        wrapper.markInitialState();
       
        wrapper.clearInitialState();
        Object state = wrapper.saveState(facesContext);

        //In this case state should not be null, because state should be saved fully
View Full Code Here


        UIComponent component = new UIOutput();
        ComponentSystemEventListener listener = new MySerializableListener();
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, listener);
       
        wrapper.markInitialState();
        Object state = wrapper.saveState(facesContext);
       
        //In this case state should be null
        assertNull(state);
       
View Full Code Here

        UIComponent component = new UIOutput();
        ComponentSystemEventListener listener = new MySerializableListener();       
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, listener);
       
        wrapper.markInitialState();
       
        wrapper.clearInitialState();
        Object state = wrapper.saveState(facesContext);

        //In this case state should not be null, because state should be saved fully
View Full Code Here

        UIComponent component = new UIOutput();
        ComponentSystemEventListener listener = new MyStateHolderListener();
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, listener);
       
        wrapper.markInitialState();
        Object state = wrapper.saveState(facesContext);
       
        //In this case state should be not null, because it implements StateHolder
        assertNotNull(state);
       
View Full Code Here

        UIComponent component = new UIOutput();
        ComponentSystemEventListener listener = new MyStateHolderListener();       
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, listener);
       
        wrapper.markInitialState();
       
        wrapper.clearInitialState();
        Object state = wrapper.saveState(facesContext);

        //In this case state should not be null, because state should be saved fully
View Full Code Here

        UIComponent component = new UIOutput();
        ComponentSystemEventListener listener = new MyPartialStateHolderListener();
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, listener);
       
        wrapper.markInitialState();
        Object state = wrapper.saveState(facesContext);
       
        //In this case state should be null
        assertNull(state);
       
View Full Code Here

        UIComponent component = new UIOutput();
        MyPartialStateHolderListener listener = new MyPartialStateHolderListener();
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, listener);
       
        wrapper.markInitialState();
       
        listener.setI(2);
        Object state = wrapper.saveState(facesContext);
       
        //In this case state should be not null, because something changed inside the listener
View Full Code Here

        UIComponent component = new UIOutput();
        ComponentSystemEventListener listener = new MyPartialStateHolderListener();       
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, listener);
       
        wrapper.markInitialState();
       
        wrapper.clearInitialState();
        Object state = wrapper.saveState(facesContext);

        //In this case state should not be null, because state should be saved fully
View Full Code Here

    {
        UIComponent component = new UIOutput();
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, component);
       
        wrapper.markInitialState();
        Object state = wrapper.saveState(facesContext);
       
        //In this case state should be null
        assertNull(state);
       
View Full Code Here

    {
        UIComponent component = new UIOutput();
        //This case happens when @ListenerFor is attached on the component class
        EventListenerWrapper wrapper = new EventListenerWrapper(component, component);
       
        wrapper.markInitialState();
       
        wrapper.clearInitialState();
        Object state = wrapper.saveState(facesContext);

        //In this case state should not be null, because state should be saved fully
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.