Package org.apache.wicket.util.resource

Examples of org.apache.wicket.util.resource.WebExternalResourceStream


   * @param uri
   *            the relative url of the external resource
   */
  public WebExternalResourceRequestTarget(String uri)
  {
    super(new WebExternalResourceStream(uri));
    this.uri = uri;
  }
View Full Code Here


   * @param uri
   *            the relative url of the external resource
   */
  public WebExternalResourceRequestTarget(String uri)
  {
    super(new WebExternalResourceStream(uri));
    this.uri = uri;
  }
View Full Code Here

  /**
   * @see org.apache.wicket.Resource#getResourceStream()
   */
  public IResourceStream getResourceStream()
  {
    return new WebExternalResourceStream(path);
  }
View Full Code Here

   * @throws Exception
   */
  // 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"));
View Full Code Here

      public IRequestTarget decode(RequestParameters requestParameters)
      {
        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.util.resource.WebExternalResourceStream

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.