Package org.apache.wicket.request.resource

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


  }

  @Override
  public Iterable<? extends HeaderItem> getDependencies()
  {
    final ResourceReference backingLibraryReference;
    if (Application.exists())
    {
      backingLibraryReference = Application.get()
        .getJavaScriptLibrarySettings()
        .getJQueryReference();
View Full Code Here


            {
                return realResponse;
            }
        };

        reference = new ResourceReference("testReference")
        {
            private static final long serialVersionUID = 1L;

            @Override
            public IResource getResource()
View Full Code Here

   */
  @Test
  public void urlForResourceReference() throws Exception
  {
    final IStaticCacheableResource resource = mock(IStaticCacheableResource.class);
    ResourceReference reference = new ResourceReference("dummy")
    {
      @Override
      public IResource getResource()
      {
        return resource;
View Full Code Here

   */
  @Test
  public void urlForResourceReferenceWithNonStaticResource() throws Exception
  {
    final IResource resource = mock(IResource.class);
    ResourceReference reference = new ResourceReference("dummy")
    {
      @Override
      public IResource getResource()
      {
        return resource;
View Full Code Here

   * @return the bundle with the preserved details
   */
  private HeaderItem preserveJavaScriptDetails(JavaScriptReferenceHeaderItem item, JavaScriptReferenceHeaderItem bundle)
  {
    HeaderItem resultBundle;
    ResourceReference bundleReference = bundle.getReference();
    if (bundleReference instanceof ReplacementResourceBundleReference)
    {
      resultBundle = JavaScriptHeaderItem.forReference(bundleReference,
          item.getPageParameters(),
          item.getId(),
View Full Code Here

   * @return the bundle with the preserved details
   */
  protected HeaderItem preserveCssDetails(CssReferenceHeaderItem item, CssReferenceHeaderItem bundle)
  {
    HeaderItem resultBundle;
    ResourceReference bundleReference = bundle.getReference();
    if (bundleReference instanceof ReplacementResourceBundleReference)
    {
      resultBundle = CssHeaderItem.forReference(bundleReference,
          item.getPageParameters(),
          item.getMedia(),
View Full Code Here

   *            Resource to store
   */
  public final void add(final Class<?> scope, final String name, final Locale locale,
    final String style, final String variation, final IResource resource)
  {
    ResourceReference ref = new AutoResourceReference(scope, name, locale, style, variation,
      resource);
    registry.registerResourceReference(ref);
  }
View Full Code Here

      }
      providedResourcesToBundles.put(curProvidedResource, bundle);
    }
    if (bundle instanceof IReferenceHeaderItem)
    {
      ResourceReference reference = ((IReferenceHeaderItem) bundle).getReference();
      if (reference.canBeRegistered())
      {
        registry.registerResourceReference(reference);
      }
    }
    return bundle;
View Full Code Here

   * @param response
   */
  @Override
  public void renderHead(final IHeaderResponse response)
  {
    ResourceReference css = getCSS();
    if (css != null)
    {
      response.render(CssHeaderItem.forReference(css));
    }
    response.render(JavaScriptHeaderItem.forReference(JAVASCRIPT));
View Full Code Here

    super.renderHead(response);

    CoreLibrariesContributor.contributeAjax(getApplication(), response);
    response.render(JavaScriptHeaderItem.forReference(JAVASCRIPT));

    ResourceReference cssResource = newCssResource();
    if (cssResource != null)
    {
      response.render(CssHeaderItem.forReference(cssResource));
    }
  }
View Full Code Here

TOP

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

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.