Package javax.faces.component

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


    this.servletRequest.setParameter("testForm:alignment", "10");
    FacesContext faces = FacesContext.getCurrentInstance();
    UIViewRoot root = new UIViewRoot();
    f.apply(faces, root);
    UISelectOne one = (UISelectOne) root.findComponent("testForm:alignment");
    root.processDecodes(faces);
    root.processValidators(faces);
    System.out.println(faces.getMessages().hasNext());
  }

}
View Full Code Here


        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

  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)
        String expected = "/t/1/t/2/t/3/t/4";
        assertEquals(expected, TestListener.trace());
View Full Code Here

            }
        }
        // CASE: renderReponse not set; responseComplete not set;
        // check for existence of events before processDecodes
        checkEventQueuesSizes(events, 1, 1, 1, 1);
        root.processDecodes(facesContext);
        // there should be no events
        checkEventQueuesSizes(events, 0, 1, 1, 1);
                                                                                    
        // requeue apply request event
        root.queueEvent(event1);
View Full Code Here

        String expected = "/t/1/t/2";

        // Fire off the relevant lifecycle methods and check expected results
        TestListener.trace(null);
        assertEquals("", TestListener.trace());
        root.processDecodes(facesContext);
        if (PhaseId.APPLY_REQUEST_VALUES.equals(phaseId) ||
            PhaseId.ANY_PHASE.equals(phaseId)) {
            assertEquals(expected, TestListener.trace());
        } else {
            assertEquals("", TestListener.trace());
View Full Code Here

    * @see org.jboss.portletbridge.lifecycle.LifecyclePhase#executePhase(javax.faces.context.FacesContext)
    */
   public void executePhase(FacesContext context) {
    UIViewRoot viewRoot = context.getViewRoot();
    if (null != viewRoot) {
      viewRoot.processDecodes(context);

    }
  }

   /* (non-Javadoc)
 
View Full Code Here

         
          externalContext.addRequestParameterMap((String) keyValue.getKey(), (String) keyValue.getValue());
        }

          UIViewRoot root = facesContext.getViewRoot();
          root.processDecodes(facesContext);
          root.processValidators(facesContext);
          root.processUpdates(facesContext);
          root.processApplication(facesContext);
         
          renderedView = renderView();
View Full Code Here

    HtmlPage renderedView = renderView();
        HtmlAnchor htmlLink = (HtmlAnchor) renderedView.getHtmlElementById(command.getClientId(facesContext));
        htmlLink.click();
        externalContext.addRequestParameterMap(p2d.getClientId(facesContext),((UIPaint2D)p2d).getBgcolor());
        UIViewRoot root = facesContext.getViewRoot();
        root.processDecodes(facesContext);     
    UIPaint2D uiP2d = (UIPaint2D) p2d;
    assertTrue(externalContext.getRequestParameterMap().get(p2d.getClientId(facesContext)).equals(uiP2d.getBgcolor()));
   
      }
  /*
 
View Full Code Here

        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

  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)
        String expected = "/t/1/t/2/t/3/t/4";
        assertEquals(expected, TestListener.trace());
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.