Package org.apache.wicket.markup.head

Examples of org.apache.wicket.markup.head.HeaderItem


    }

    @Override
    public Iterable<? extends HeaderItem> getDependencies()
    {
      HeaderItem jquery = JavaScriptHeaderItem.forReference(WicketEventJQueryResourceReference.get());
      HeaderItem stylesheet = CssHeaderItem.forReference(bootstrapCss);

      return asList(jquery, stylesheet);
    }
View Full Code Here


    }

    @Override
    public Iterable<? extends HeaderItem> getDependencies()
    {
      HeaderItem jquery = JavaScriptHeaderItem.forReference(WicketEventJQueryResourceReference.get());
      HeaderItem stylesheet = CssHeaderItem.forReference(bootstrapCss);
      HeaderItem responsive = CssHeaderItem.forReference(bootstrapResponsiveCss);
      return asList(jquery, stylesheet, responsive);
    }
View Full Code Here

   * bundle {a, b->a}, render [a], should render [ab]
   */
  @Test
  public void testBundle()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceA()));
    assertItems(bundleAB);
View Full Code Here

   * bundle {a, b->a}, render [b], should render [ab]
   */
  @Test
  public void testBundleRenderingOther()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceB()));
    assertItems(bundleAB);
View Full Code Here

   * bundle {a, b->a}, render [a, b], should render [ab]
   */
  @Test
  public void testBundleRenderingBoth()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceA()));
    aggregator.render(forReference(new ResourceReferenceB()));
View Full Code Here

   * bundle {a, b->a}, render [d->c->a], should render [ab, c, d]
   */
  @Test
  public void testBundleRenderedAsDependency()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    aggregator.render(forReference(new ResourceReferenceD()));
    assertItems(bundleAB, forReference(new ResourceReferenceC()),
View Full Code Here

   * bundle {c->a, d->c->a}, render [d], should render [a, cd]
   */
  @Test
  public void testBundleWithDependencies()
  {
    HeaderItem bundleCD = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "cd.js", new ResourceReferenceC(),
        new ResourceReferenceD());
    aggregator.render(forReference(new ResourceReferenceD()));
    assertItems(forReference(new ResourceReferenceA()), bundleCD);
View Full Code Here

   * bundle {a, b->a} and {c->a, d->c->a}, render [d], should render [ab, cd]
   */
  @Test
  public void testTwoBundlesWithDependencies()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    HeaderItem bundleCD = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "cd.js", new ResourceReferenceC(),
        new ResourceReferenceD());
    aggregator.render(forReference(new ResourceReferenceD()));
    assertItems(bundleAB, bundleCD);
View Full Code Here

   * bundle {a, b->a} and {c->a, d->c->a}, render [priority(b), d], should render [ab, cd]
   */
  @Test
  public void testTwoBundlesWithDependenciesAndPriority()
  {
    HeaderItem bundleAB = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
        new ResourceReferenceB());
    HeaderItem bundleCD = Application.get()
      .getResourceBundles()
      .addJavaScriptBundle(Application.class, "cd.js", new ResourceReferenceC(),
        new ResourceReferenceD());
    aggregator.render(new PriorityHeaderItem(forReference(new ResourceReferenceB())));
    aggregator.render(forReference(new ResourceReferenceD()));
View Full Code Here

    }

    @Override
    public Iterable<? extends HeaderItem> getDependencies()
    {
      HeaderItem jquery = JavaScriptHeaderItem.forReference(WicketEventJQueryResourceReference.get());
      HeaderItem stylesheet = CssHeaderItem.forReference(BOOTSTRAP_CSS);

      return asList(jquery, stylesheet);
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.head.HeaderItem

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.