Package org.apache.wicket.request.resource

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


      {
        return "wicketDebugBar" + (DebugBar.this.hasErrorMessage() ? "Error" : "");
      }
    }));

    add(new Image("logo", new PackageResourceReference(DebugBar.class, "wicket.png")));
   
    add(contentSection("content", initiallyExpanded));
  }
View Full Code Here


          item.add(comp);
        }
      }
    });

    section.add(new Image("removeImg", new PackageResourceReference(DebugBar.class, "remove.png")));

    return section;
  }
View Full Code Here

    private final Map<ImageResourceCacheKey, ResourceReference> resourceReferenceByKey = Maps.newConcurrentMap();
    private final PackageResourceReference fallbackResource;

    public ImageResourceCacheClassPath() {
        fallbackResource = new PackageResourceReference(Images.class, FALLBACK_IMAGE);
        resourceReferenceByKey.put(new ImageResourceCacheKey(null, null), fallbackResource);
    }
View Full Code Here

            final String iconName = resourceKey.getResourceName();

            final InputStream resourceAsStream = resourceClass.getResourceAsStream(iconName);
            if (resourceAsStream != null) {
                closeSafely(resourceAsStream);
                return new PackageResourceReference(resourceClass, iconName);
            }
        }
        return fallbackResource;
    }
View Full Code Here

   * @return the url to use for the popup button/ icon
   */
  protected CharSequence getIconUrl()
  {
    return RequestCycle.get().urlFor(
      new ResourceReferenceRequestHandler(new PackageResourceReference(DatePicker.class,
        "icon1.gif")));
  }
View Full Code Here

  /**
   * add header contributions for packaged resources.
   */
  private void contributeDependencies(IHeaderResponse response)
  {
    response.renderJavascriptReference(new PackageResourceReference(YuiLib.class,
        "yahoo-dom-event/yahoo-dom-event.js"));
    response.renderJavascriptReference(new PackageResourceReference(AbstractCalendar.class,
        "calendar-min.js"));
    response.renderCSSReference(new PackageResourceReference(AbstractCalendar.class,
        "assets/skins/sam/calendar.css"));
  }
View Full Code Here

  public void renderHead(IHeaderResponse response)
  {
    super.renderHead(response);
    if (addDefaultCssStyle)
    {
      response.renderCSSReference(new PackageResourceReference(RatingPanel.class,
        "RatingPanel.css"));
    }

  }
View Full Code Here

  {
    ResourceReference rr = new SharedResourceReference("test");
    CharSequence url = tester.getRequestCycle().mapUrlFor(rr, null).toString();
    assertEquals("wicket/resource/org.apache.wicket.Application/test", url);

    rr = new PackageResourceReference(SharedResourceUrlTest.class, "test");
    url = tester.getRequestCycle().mapUrlFor(rr, null).toString();
    assertEquals("wicket/resource/org.apache.wicket.SharedResourceUrlTest/test", url);
  }
View Full Code Here

    CharSequence url = tester.getRequestCycle()
      .mapUrlFor(rr, new PageParameters("param=value", ""))
      .toString();
    assertEquals("wicket/resource/org.apache.wicket.Application/test?param=value", url);

    rr = new PackageResourceReference(SharedResourceUrlTest.class, "test");
    url = tester.getRequestCycle()
      .mapUrlFor(rr, new PageParameters("param=value", ""))
      .toString();
    assertEquals("wicket/resource/org.apache.wicket.SharedResourceUrlTest/test?param=value",
      url);
View Full Code Here

   *
   * @param response
   */
  public void addDefaultCssStyle(final IHeaderResponse response)
  {
    response.renderCSSReference(new PackageResourceReference(Wizard.class, "Wizard.css"));
  }
View Full Code Here

TOP

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

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.