Package org.apache.wicket.core.request.handler

Examples of org.apache.wicket.core.request.handler.IPageProvider


  @Test
  public void setQueryParameterWhenRequestHasAnQueryUrl()
  {
    PageParameters parameters = new PageParameters();
    parameters.set("q_1", "q_1_value");
    IPageProvider testPageProvider = new PageProvider(MockPageParametersAware.class, parameters);
    IRequestHandler pageRequestHandler = new BookmarkablePageRequestHandler(testPageProvider);
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(pageRequestHandler);
    tester.getRequest().setParameter("q_2", "q_2_value");
    tester.getRequest().setUrl(url);
View Full Code Here


  public void setMultiValueQueryParameter()
  {
    PageParameters parameters = new PageParameters();
    parameters.add("q_1", "q_1_value_1");
    parameters.add("q_1", "q_1_value_2");
    IPageProvider testPageProvider = new PageProvider(MockPageParametersAware.class, parameters);
    IRequestHandler pageRequestHandler = new BookmarkablePageRequestHandler(testPageProvider);
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(pageRequestHandler);
    tester.getRequest().addParameter("q_2", "q_2_value_1");
    tester.getRequest().addParameter("q_2", "q_2_value_2");
    tester.getRequest().setUrl(url);
View Full Code Here

  @Test
  public void setQueryParameterWhenRequestHasAnQueryUrl()
  {
    PageParameters parameters = new PageParameters();
    parameters.set("q_1", "q_1_value");
    IPageProvider testPageProvider = new PageProvider(MockPageParametersAware.class, parameters);
    IRequestHandler pageRequestHandler = new BookmarkablePageRequestHandler(testPageProvider);
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(pageRequestHandler);
    tester.getRequest().setParameter("q_2", "q_2_value");
    tester.getRequest().setUrl(url);
View Full Code Here

  public void setMultiValueQueryParameter()
  {
    PageParameters parameters = new PageParameters();
    parameters.add("q_1", "q_1_value_1");
    parameters.add("q_1", "q_1_value_2");
    IPageProvider testPageProvider = new PageProvider(MockPageParametersAware.class, parameters);
    IRequestHandler pageRequestHandler = new BookmarkablePageRequestHandler(testPageProvider);
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(pageRequestHandler);
    tester.getRequest().addParameter("q_2", "q_2_value_1");
    tester.getRequest().addParameter("q_2", "q_2_value_2");
    tester.getRequest().setUrl(url);
View Full Code Here

  @Test
  public void setQueryParameterWhenRequestHasAnQueryUrl()
  {
    PageParameters parameters = new PageParameters();
    parameters.set("q_1", "q_1_value");
    IPageProvider testPageProvider = new PageProvider(MockPageParametersAware.class, parameters);
    IRequestHandler pageRequestHandler = new BookmarkablePageRequestHandler(testPageProvider);
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(pageRequestHandler);
    tester.getRequest().setParameter("q_2", "q_2_value");
    tester.getRequest().setUrl(url);
View Full Code Here

  public void setMultiValueQueryParameter()
  {
    PageParameters parameters = new PageParameters();
    parameters.add("q_1", "q_1_value_1");
    parameters.add("q_1", "q_1_value_2");
    IPageProvider testPageProvider = new PageProvider(MockPageParametersAware.class, parameters);
    IRequestHandler pageRequestHandler = new BookmarkablePageRequestHandler(testPageProvider);
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(pageRequestHandler);
    tester.getRequest().addParameter("q_2", "q_2_value_1");
    tester.getRequest().addParameter("q_2", "q_2_value_2");
    tester.getRequest().setUrl(url);
View Full Code Here

   *
   * @param pageClass
   */
  public void setResponsePage(Class<? extends IRequestablePage> pageClass)
  {
    IPageProvider provider = new PageProvider(pageClass, null);
    scheduleRequestHandlerAfterCurrent(new RenderPageRequestHandler(provider,
      RenderPageRequestHandler.RedirectPolicy.ALWAYS_REDIRECT));
  }
View Full Code Here

   * @param parameters
   */
  public void setResponsePage(Class<? extends IRequestablePage> pageClass,
    PageParameters parameters)
  {
    IPageProvider provider = new PageProvider(pageClass, parameters);
    scheduleRequestHandlerAfterCurrent(new RenderPageRequestHandler(provider,
      RenderPageRequestHandler.RedirectPolicy.ALWAYS_REDIRECT));
  }
View Full Code Here

  @Test
  public void setQueryParameterWhenRequestHasAnQueryUrl()
  {
    PageParameters parameters = new PageParameters();
    parameters.set("q_1", "q_1_value");
    IPageProvider testPageProvider = new PageProvider(MockPageParametersAware.class, parameters);
    IRequestHandler pageRequestHandler = new BookmarkablePageRequestHandler(testPageProvider);
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(pageRequestHandler);
    tester.getRequest().setParameter("q_2", "q_2_value");
    tester.getRequest().setUrl(url);
View Full Code Here

  public void setMultiValueQueryParameter()
  {
    PageParameters parameters = new PageParameters();
    parameters.add("q_1", "q_1_value_1");
    parameters.add("q_1", "q_1_value_2");
    IPageProvider testPageProvider = new PageProvider(MockPageParametersAware.class, parameters);
    IRequestHandler pageRequestHandler = new BookmarkablePageRequestHandler(testPageProvider);
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(pageRequestHandler);
    tester.getRequest().addParameter("q_2", "q_2_value_1");
    tester.getRequest().addParameter("q_2", "q_2_value_2");
    tester.getRequest().setUrl(url);
View Full Code Here

TOP

Related Classes of org.apache.wicket.core.request.handler.IPageProvider

Copyright © 2018 www.massapicom. 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.