Package org.apache.wicket.request.target.resource

Examples of org.apache.wicket.request.target.resource.ResourceStreamRequestTarget


        };
        // Get servlet response to use when responding with resource
        final Response response = getRequestCycle().getResponse();
        // set not cacheable
        response.setLastModifiedTime(Time.valueOf(-1));
        getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream, WicketURLEncoder.QUERY_INSTANCE.encode(resourceProvider.getName())));
    }
View Full Code Here


    }
    final String fn = (fileName != null) ? fileName : file.getName();

    IResourceStream resourceStream = new FileResourceStream(
      new org.apache.wicket.util.file.File(file));
    getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream)
    {
      @Override
      public String getFileName()
      {
        return fn;
View Full Code Here

      {
        response.setLastModifiedTime(Time.valueOf(-1));
      }
      configureResponse(response);

      cycle.setRequestTarget(new ResourceStreamRequestTarget(resourceStream));
    }
    finally
    {
      // Really really really make sure parameters are cleared
      parameters.set(null);
View Full Code Here

      {
        response.setLastModifiedTime(Time.valueOf(-1));
      }
      configureResponse(response);

      cycle.setRequestTarget(new ResourceStreamRequestTarget(resourceStream));
    }
    finally
    {
      // Really really really make sure parameters are cleared
      parameters.set(null);
View Full Code Here

      {
        response.setLastModifiedTime(Time.valueOf(-1));
      }
      configureResponse(response);

      cycle.setRequestTarget(new ResourceStreamRequestTarget(resourceStream));
    }
    finally
    {
      // Really really really make sure parameters are cleared
      parameters.set(null);
View Full Code Here

      {
        String path = "/staticpages/" + getURI(requestParameters);
        IResourceStream xslStream = new PackageResourceStream(Application.class,
            "layout.xsl");
        IResourceStream docStream = new WebExternalResourceStream(path);
        return new ResourceStreamRequestTarget(new XSLTResourceStream(xslStream, docStream));
      }
    });

    // Passing URI to a Wicket page
    mount(new URIRequestTargetUrlCodingStrategy("/pages")
View Full Code Here

   * @see org.apache.wicket.markup.html.link.Link#onClick()
   */
  public void onClick()
  {
    IResourceStream resourceStream = new FileResourceStream(new org.apache.wicket.util.file.File(file));
    getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream) {
      public String getFileName()
      {
        return fileName;
      }
    });
View Full Code Here

      : file.getName());


    IResourceStream resourceStream = new FileResourceStream(
      new org.apache.wicket.util.file.File(file));
    getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream)
    {
      @Override
      public String getFileName()
      {
        return fn;
View Full Code Here

      {
        response.setLastModifiedTime(Time.valueOf(-1));
      }
      configureResponse(response);

      cycle.setRequestTarget(new ResourceStreamRequestTarget(resourceStream));
    }
    finally
    {
      // Really really really make sure parameters are cleared
      parameters.set(null);
View Full Code Here

      {
        String path = "/staticpages/" + getURI(requestParameters);
        IResourceStream xslStream = new PackageResourceStream(Application.class,
          "layout.xsl");
        IResourceStream docStream = new WebExternalResourceStream(path);
        return new ResourceStreamRequestTarget(new XSLTResourceStream(xslStream, docStream));
      }
    });

    // All requests to bookmarkable page "Page" will be captured, and the
    // "Sent" page is shown instead
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.target.resource.ResourceStreamRequestTarget

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.