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

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


      {
        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


   */
  // FIXME WebExternalResourceStream does not implement length()
  public void testWebExternalResource() throws Exception
  {
    WebExternalResourceStream resource = new WebExternalResourceStream("/index.html");
    ResourceStreamRequestTarget rt = new ResourceStreamRequestTarget(resource);
    WebRequestCycle cycle = tester.createRequestCycle();
    cycle.setRequestTarget(rt);
    tester.processRequestCycle(cycle);
    assertTrue(tester.getContentTypeFromResponseHeader().startsWith("text/html"));
    // WebExternalResourceStream does not set Content-Length
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));
      }
    });
  }
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

    }
    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)
    {
      public String getFileName()
      {
        return fn;
      }
View Full Code Here

   */
  // FIXME WebExternalResourceStream does not implement length()
  public void testWebExternalResource() throws Exception
  {
    WebExternalResourceStream resource = new WebExternalResourceStream("/index.html");
    ResourceStreamRequestTarget rt = new ResourceStreamRequestTarget(resource);
    WebRequestCycle cycle = tester.createRequestCycle();
    cycle.setRequestTarget(rt);
    tester.processRequestCycle(cycle);
    assertTrue(tester.getContentTypeFromResponseHeader().startsWith("text/html"));
    // WebExternalResourceStream does not set Content-Length
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

      : 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

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.