Package org.apache.wicket

Examples of org.apache.wicket.IRequestTarget


  {
    IRequestCodingStrategy requestCodingStrategy = requestCycle.getProcessor()
      .getRequestCodingStrategy();

    final String path = requestParameters.getPath();
    IRequestTarget target = null;

    // See whether this request points to a bookmarkable page
    if (requestParameters.getBookmarkablePageClass() != null)
    {
      target = resolveBookmarkablePage(requestCycle, requestParameters);
View Full Code Here


        // , IBookmarkablePageRequestTarget)
        // since only the test is suffering from this problem

        // this is a bit ugly and i am open to suggestions on how to fix this better. MM
        String pageMapName;
        IRequestTarget currentTarget = cycle.getRequestTarget();
        if (currentTarget instanceof IPageRequestTarget)
        {
          Page currentPage = ((IPageRequestTarget)currentTarget).getPage();
          final IPageMap pageMap = currentPage.getPageMap();
          if (pageMap.isDefault())
View Full Code Here

    {
      Class<? extends Page> responseClass = cycle.getResponsePageClass();
      if (responseClass != null)
      {
        Session.set(cycle.getSession());
        IRequestTarget target = cycle.getRequestTarget();
        if (target instanceof IPageRequestTarget)
        {
          newLastRenderedPage = ((IPageRequestTarget)target).getPage();
        }
        else if (target instanceof IBookmarkablePageRequestTarget)
View Full Code Here


  @Override
  protected final void onRequest(final String val, RequestCycle requestCycle)
  {
    IRequestTarget target = new IRequestTarget()
    {

      public void respond(RequestCycle requestCycle)
      {
View Full Code Here

    tester.assertRenderedPage(TestPage.class);
  }

  int getErrorCode(RequestCycle requestCycle)
  {
    IRequestTarget requestTarget = requestCycle.getRequestTarget();
    assertTrue(requestTarget instanceof WebErrorCodeResponseTarget);
    WebErrorCodeResponseTarget error = (WebErrorCodeResponseTarget)requestTarget;
    return error.getErrorCode();
  }
View Full Code Here

      TestPage.class);
    PageParameters params = new PageParameters();
    params.add("a", "1");
    params.add("a", "2");
    params.add("b", "1");
    IRequestTarget rt = new BookmarkablePageRequestTarget(TestPage.class, params);
    String path = ucs.encode(rt).toString();
    log.debug(path);
    assertEquals("mount/point?a=1&a=2&b=1", path);
  }
View Full Code Here

      TestPage.class);

    WicketTester tester = new WicketTester();
    tester.setupRequestAndResponse();
    TestPage page = new TestPage(null);
    IRequestTarget requestTarget = new ListenerInterfaceRequestTarget(page, page,
      IRedirectListener.INTERFACE);
    strategy.encode(requestTarget);
  }
View Full Code Here

    // Find pagemap name
    String pageMapName = requestTarget.getPageMapName();
    if (pageMapName == null)
    {
      IRequestTarget currentTarget = requestCycle.getRequestTarget();
      if (currentTarget instanceof IPageRequestTarget)
      {
        Page currentPage = ((IPageRequestTarget)currentTarget).getPage();
        final IPageMap pageMap = currentPage.getPageMap();
        if (pageMap.isDefault())
View Full Code Here

    {
      IRequestCodingStrategy requestCodingStrategy = requestCycle.getProcessor()
        .getRequestCodingStrategy();

      final String path = requestParameters.getPath();
      IRequestTarget target = null;

      // See whether this request points to a bookmarkable page
      if (requestParameters.getBookmarkablePageClass() != null)
      {
        target = resolveBookmarkablePage(requestCycle, requestParameters);
View Full Code Here

        // , IBookmarkablePageRequestTarget)
        // since only the test is suffering from this problem

        // this is a bit ugly and i am open to suggestions on how to fix this better. MM
        String pageMapName;
        IRequestTarget currentTarget = cycle.getRequestTarget();
        if (currentTarget instanceof IPageRequestTarget)
        {
          Page currentPage = ((IPageRequestTarget)currentTarget).getPage();
          final IPageMap pageMap = currentPage.getPageMap();
          if (pageMap.isDefault())
View Full Code Here

TOP

Related Classes of org.apache.wicket.IRequestTarget

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.