Package javax.faces.component

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


    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


        root.queueEvent(event1);
        // CASE: renderReponse set;
        // check for existence of events before processValidators
        checkEventQueuesSizes(events, 1, 1, 1, 1);
        facesContext.renderResponse();
        root.processValidators(facesContext);
        // there should be no events
        checkEventQueuesSizes(events, 0, 0, 0, 0);

        // reset FacesContext
        facesContext.setRenderResponse(false);
View Full Code Here

        }
        // CASE: response set;
        // check for existence of events before processValidators
        checkEventQueuesSizes(events, 1, 1, 1, 1);
        facesContext.renderResponse();
        root.processValidators(facesContext);
        // there should be no events
        checkEventQueuesSizes(events, 0, 0, 0, 0);

        // reset FacesContext
        facesContext.setRenderResponse(false);
View Full Code Here

            PhaseId.ANY_PHASE.equals(phaseId)) {
            assertEquals(expected, TestListener.trace());
        } else {
            assertEquals("", TestListener.trace());
        }
        root.processValidators(facesContext);
        if (PhaseId.PROCESS_VALIDATIONS.equals(phaseId) ||
            PhaseId.APPLY_REQUEST_VALUES.equals(phaseId) ||
            PhaseId.APPLY_REQUEST_VALUES.equals(phaseId) ||
            PhaseId.ANY_PHASE.equals(phaseId)) {
            assertEquals(expected, TestListener.trace());
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();
          htmlPaint2D = (HtmlImage) renderedView.getHtmlElementById(p2d.getClientId(facesContext));
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.processValidators(context);

    }
  }

   /* (non-Javadoc)
 
View Full Code Here

        root.queueEvent(event1);
        // CASE: renderReponse set;
        // check for existence of events before processValidators
        checkEventQueuesSizes(events, 1, 1, 1, 1);
        facesContext.renderResponse();
        root.processValidators(facesContext);
        // there should be no events
        checkEventQueuesSizes(events, 0, 0, 0, 0);

        // reset FacesContext
        facesContext.setRenderResponse(false);
View Full Code Here

        }
        // CASE: response set;
        // check for existence of events before processValidators
        checkEventQueuesSizes(events, 1, 1, 1, 1);
        facesContext.renderResponse();
        root.processValidators(facesContext);
        // there should be no events
        checkEventQueuesSizes(events, 0, 0, 0, 0);

        // reset FacesContext
        facesContext.setRenderResponse(false);
View Full Code Here

            PhaseId.ANY_PHASE.equals(phaseId)) {
            assertEquals(expected, TestListener.trace());
        } else {
            assertEquals("", TestListener.trace());
        }
        root.processValidators(facesContext);
        if (PhaseId.PROCESS_VALIDATIONS.equals(phaseId) ||
            PhaseId.APPLY_REQUEST_VALUES.equals(phaseId) ||
            PhaseId.APPLY_REQUEST_VALUES.equals(phaseId) ||
            PhaseId.ANY_PHASE.equals(phaseId)) {
            assertEquals(expected, TestListener.trace());
View Full Code Here

        externalContext.addRequestParameterMap(form.getClientId(facesContext), form.getClientId(facesContext));
        externalContext.addRequestParameterMap(stp1.getClientId(facesContext), "false");
        stp1.setSwitchType(UISimpleTogglePanel.CLIENT_SWITCH_TYPE);
        UIViewRoot viewRoot = facesContext.getViewRoot();
        viewRoot.processDecodes(facesContext);
        viewRoot.processValidators(facesContext);
        viewRoot.processUpdates(facesContext);

        assertFalse(stp1.isOpened());
    }
}
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.