Package org.apache.wicket.request.resource

Examples of org.apache.wicket.request.resource.UrlResourceReference


        }
        // otherwise it has to be served by the standard wicket way
      }
      else if (reference instanceof UrlResourceReference)
      {
        UrlResourceReference urlReference = (UrlResourceReference)reference;
        url = urlReference.getUrl();
        return url;
      }

      if (reference.canBeRegistered())
      {
View Full Code Here


   */
  @Override
  public List<HeaderItem> getDependencies()
  {
    List<HeaderItem> dependencies = new ArrayList<HeaderItem>();
    dependencies.add(JavaScriptHeaderItem.forReference(new UrlResourceReference(Url.parse("https://www.google.com/jsapi"))));
    dependencies.add(JavaScriptHeaderItem.forReference(WicketWebSocketJQueryResourceReference.get()));
    return dependencies;
  }
View Full Code Here

   * UrlResourceReferences, WICKET-5319
   */
  @Test
  public void urlResourceReference()
  {
    UrlResourceReference resource = new UrlResourceReference(
      Url.parse("http://wicket.apache.org/"));
    Url url = mapper.mapHandler(new ResourceReferenceRequestHandler(resource));

    assertEquals("http://wicket.apache.org/", url.toString(StringMode.FULL));
  }
View Full Code Here

   */
  @Override
  public List<HeaderItem> getDependencies()
  {
    List<HeaderItem> dependencies = super.getDependencies();
    dependencies.add(JavaScriptHeaderItem.forReference(new UrlResourceReference(Url.parse("https://www.google.com/jsapi"))));
    dependencies.add(JavaScriptHeaderItem.forReference(WicketWebSocketJQueryResourceReference.get()));
    return dependencies;
  }
View Full Code Here

   * UrlResourceReferences, WICKET-5319
   */
  @Test
  public void urlResourceReference()
  {
    UrlResourceReference resource = new UrlResourceReference(
      Url.parse("http://wicket.apache.org/"));
    Url url = mapper.mapHandler(new ResourceReferenceRequestHandler(resource));

    assertEquals("http://wicket.apache.org/", url.toString(StringMode.FULL));
  }
View Full Code Here

       * Register a resource replacement for Dojo.
       * Any usage of DojoResourceReference will be replaced by the external Google url.
       */
      addResourceReplacement(
          DojoResourceReference.get(),
          new UrlResourceReference(
              Url.parse("https://ajax.googleapis.com/ajax/libs/dojo/1.7.3/dojo/dojo.js")));
    }

    /**
     * Registers a bundle that will be used whenever a component or a behavior contributes any of
View Full Code Here

        }
        // otherwise it has to be served by the standard wicket way
      }
      else if (reference instanceof UrlResourceReference)
      {
        UrlResourceReference urlReference = (UrlResourceReference)reference;
        url = urlReference.getUrl();
        return url;
      }

      if (reference.canBeRegistered())
      {
View Full Code Here

    public void renderHead(IHeaderResponse response) {
        if (useCdnResources()) {
            Iterable<String> cdnUrls = getCdnUrls();
            if (cdnUrls != null && cdnUrls.iterator().hasNext()) {
                for (String cdnUrl : cdnUrls) {
                    response.render(CssHeaderItem.forReference(new UrlResourceReference(Url.parse(cdnUrl))));
                }
            }
            else {
                renderPackageReferences(response);
            }
View Full Code Here

    public ResourceReference getCssResourceReference() {
        ResourceReference ref;

        if (useCdnResources()) {
            String cdnUrl = String.format(CSS_CDN_PATTERN, getVersion());
            ref = new UrlResourceReference(Url.parse(cdnUrl));
        } else {
            ref = bootstrapCssReference;
        }

        return ref != null ? ref : Holder.bootstrapCssReference;
View Full Code Here

    public ResourceReference getModernizrResourceReference() {
        ResourceReference jsReference;

        if (useCdnResources()) {
            String cdnUrl = String.format(MODERNIZR_CDN_PATTERN, getModernizrVersion());
            jsReference = new UrlResourceReference(Url.parse(cdnUrl));
        } else {
            jsReference = modernizrJavaScriptReference;
        }

        return jsReference != null ? jsReference : Holder.modernizrJavaScriptReference;
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.resource.UrlResourceReference

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.