Package org.apache.wicket

Examples of org.apache.wicket.IRequestTarget


    {
      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


   * you don't have the AjaxRequestTarget instance. However, it is also safe to call this method
   * outside Ajax response.
   */
  public final void updateTree()
  {
    IRequestTarget target = getRequestCycle().getRequestTarget();
    if (target instanceof AjaxRequestTarget)
    {
      updateTree((AjaxRequestTarget)target);
    }
  }
View Full Code Here

    }

    Class<?> pageClass = getPageClass(target);
    if (pageClass != null)
    {
      IRequestTarget redirect = null;
      if (hasSecureAnnotation(pageClass))
      {
        redirect = SwitchProtocolRequestTarget.requireProtocol(Protocol.HTTPS);
      }
      else
View Full Code Here

    }

    Class<?> pageClass = getPageClass(target);
    if (pageClass != null)
    {
      IRequestTarget redirect = null;
      if (hasSecureAnnotation(pageClass))
      {
        redirect = SwitchProtocolRequestTarget.requireProtocol(Protocol.HTTPS, target);
      }
      else
View Full Code Here

    // we need to persist the session before a redirect to https so the session lasts across
    // both http and https calls.
    Session.get().bind();
    }

    IRequestTarget target = super.resolve(rc, rp);
    return checkSecure(target);
  }
View Full Code Here

  /** {@inheritDoc} */
  @Override
  public void respond(RequestCycle requestCycle)
  {
    IRequestTarget requestTarget = requestCycle.getRequestTarget();
    if (requestTarget != null)
    {
      IRequestTarget secured = checkSecureOutgoing(requestTarget);
      if (secured != requestTarget)
      {
        requestCycle.setRequestTarget(secured);
        // respond will be called again because we called setrequesttarget(), so we do not
        // process it this time
View Full Code Here

  {
    RequestCycle rc = RequestCycle.get();
    IRequestCycleProcessor processor = rc.getProcessor();
    final RequestParameters requestParameters = processor.getRequestCodingStrategy().decode(
      new FormDispatchRequest(rc.getRequest(), url));
    IRequestTarget rt = processor.resolve(rc, requestParameters);
    if (rt instanceof IListenerInterfaceRequestTarget)
    {
      IListenerInterfaceRequestTarget interfaceTarget = ((IListenerInterfaceRequestTarget)rt);
      interfaceTarget.getRequestListenerInterface().invoke(page, interfaceTarget.getTarget());
    }
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

      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

  {
    RequestCycle rc = RequestCycle.get();
    IRequestCycleProcessor processor = rc.getProcessor();
    final RequestParameters requestParameters = processor.getRequestCodingStrategy().decode(
      new FormDispatchRequest(rc.getRequest(), url));
    IRequestTarget rt = processor.resolve(rc, requestParameters);
    if (rt instanceof IListenerInterfaceRequestTarget)
    {
      IListenerInterfaceRequestTarget interfaceTarget = ((IListenerInterfaceRequestTarget)rt);
      interfaceTarget.getRequestListenerInterface().invoke(page, interfaceTarget.getTarget());
    }
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.