public FacesRequest createFacesRequest(String url) throws MalformedURLException, FacesException { return environment.createFacesRequest(url); }
public FacesRequest createFacesRequest(String url) throws MalformedURLException, FacesException { return environment.createFacesRequest(url); }
public FacesRequest createFacesRequest() throws Exception { return environment.createFacesRequest(); }
public FacesRequest createFacesRequest() throws Exception { return environment.createFacesRequest(); }
/** * Setup virtual server connection to run tests inside JSF lifecycle. The default implementation setups virtual * request to the "http://localhost/test.jsf" URL and creates {@link FacesContext} instance. Two template methods * are called : * <ol> * <li>{@link #setupConnection()} to prepare request method, parameters, headers and so</li> * <li>{@link #setupView()} to create default view.</li> * </ol> * * @throws Exception */ public FacesRequest createFacesRequest() throws Exception { String url = "http://localhost/test.jsf"; return createFacesRequest(url).withViewId("/test.xhtml"); }
/** * Setup virtual server connection to run tests inside JSF lifecycle. The default implementation setups virtual * request to the "http://localhost/test.jsf" URL and creates {@link FacesContext} instance. Two template methods * are called : * <ol> * <li>{@link #setupConnection()} to prepare request method, parameters, headers and so</li> * <li>{@link #setupView()} to create default view.</li> * </ol> * * @throws Exception */ public FacesRequest createFacesRequest() throws Exception { String url = "http://localhost/test.jsf"; return createFacesRequest(url).withViewId("/test.xhtml"); }
public FacesRequest submit() throws MalformedURLException, FacesException { if (!connection.isFinished()) { throw new IllegalStateException(); } // Extract VIEW_STATE value. Map<String, String> fields = getHiddenFields(connection.getContentAsString()); if (!fields.containsKey(ResponseStateManager.VIEW_STATE_PARAM)) { throw new FacesException("No view state field in response"); } FacesRequest facesRequest = createFacesRequest(connection.getRequest().getRequestURL().toString()) .withViewId(viewId); facesRequest.connection.setRequestMethod(HttpMethod.POST); for (Map.Entry<String, String> entry : fields.entrySet()) { facesRequest.withParameter(entry.getKey(), entry.getValue()); } return facesRequest; }
public FacesRequest submit() throws MalformedURLException, FacesException { if (!connection.isFinished()) { throw new IllegalStateException(); } // Extract VIEW_STATE value. Map<String, String> fields = getHiddenFields(connection.getContentAsString()); if (!fields.containsKey(ResponseStateManager.VIEW_STATE_PARAM)) { throw new FacesException("No view state field in response"); } FacesRequest facesRequest = createFacesRequest(connection.getRequest().getRequestURL().toString()) .withViewId(viewId); facesRequest.connection.setRequestMethod(HttpMethod.POST); for (Map.Entry<String, String> entry : fields.entrySet()) { facesRequest.withParameter(entry.getKey(), entry.getValue()); } return facesRequest; }