Package javax.faces.component

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


        facesContext.setRenderResponse(false);
        facesContext.setResponseComplete(false);
        // requeue all events
        root.queueEvent(event1);
        root.queueEvent(event2);
        root.queueEvent(event3);
        root.queueEvent(event4);
        try {
            events = TypedCollections.dynamicallyCastList((List) field.get(root), List.class);
        } catch (Exception e) {
            assertTrue(false);
View Full Code Here


        facesContext.setResponseComplete(false);
        // requeue all events
        root.queueEvent(event1);
        root.queueEvent(event2);
        root.queueEvent(event3);
        root.queueEvent(event4);
        try {
            events = TypedCollections.dynamicallyCastList((List) field.get(root), List.class);
        } catch (Exception e) {
            assertTrue(false);
        }
View Full Code Here

        root.addFacesListener(listener);

        // Queue some events to be processed
  event = new TestEvent(root, "1");
  event.setPhaseId(phaseId);
        root.queueEvent(event);
  event = new TestEvent(root, "2");
  event.setPhaseId(phaseId);
        root.queueEvent(event);
        String expected = "/t/1/t/2";
View Full Code Here

  event = new TestEvent(root, "1");
  event.setPhaseId(phaseId);
        root.queueEvent(event);
  event = new TestEvent(root, "2");
  event.setPhaseId(phaseId);
        root.queueEvent(event);
        String expected = "/t/1/t/2";

        // Fire off the relevant lifecycle methods and check expected results
        TestListener.trace(null);
        assertEquals("", TestListener.trace());
View Full Code Here

        // Queue two event and check the results
        TestListener.trace(null);
        TestEvent event1 = new TestEvent(root, "1");
        event1.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event1);
        TestEvent event2 = new TestEvent(root, "2");
        event2.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event2);
        root.processDecodes(facesContext);
        assertEquals("/a/1/b/1/a/2/b/2", TestListener.trace());
View Full Code Here

        TestEvent event1 = new TestEvent(root, "1");
        event1.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event1);
        TestEvent event2 = new TestEvent(root, "2");
        event2.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event2);
        root.processDecodes(facesContext);
        assertEquals("/a/1/b/1/a/2/b/2", TestListener.trace());

    }
View Full Code Here

        TestListener.trace(null);

        // Queue some events, including the trigger one
  TestEvent event = new TestEvent(root, "1");
  event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event);
  event = new TestEvent(root, "2");
  event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event);
  event = new TestEvent(root, "3");
  event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
View Full Code Here

  TestEvent event = new TestEvent(root, "1");
  event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event);
  event = new TestEvent(root, "2");
  event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event);
  event = new TestEvent(root, "3");
  event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event);

        // Simulate the Apply Request Values phase
View Full Code Here

  event = new TestEvent(root, "2");
  event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event);
  event = new TestEvent(root, "3");
  event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event);

        // Simulate the Apply Request Values phase
        root.processDecodes(facesContext);

        // Validate the results (expect 4th event to also be queued)
View Full Code Here

    public void testEventsListClear() {
        UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
        TestEvent event1, event2, event3, event4 = null;
        event1 = new TestEvent(root, "1");
        event1.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
        root.queueEvent(event1);
        event2 = new TestEvent(root, "2");
        event2.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
        root.queueEvent(event2);
        event3 = new TestEvent(root, "3");
        event3.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
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.