Class References

java.lang.Object
de.agilecoders.wicket.core.util.References

public final class References extends Object
#### Description Helper class for ResourceReference handling.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    #### Description adds a ".min" extension in front of original extension if minimization is active.
    static void
    #### Description renders a given header item with as a `FilteredHeaderItem` with filter name from bootstrap settings if present. #### Usage you can call this method in `renderHeader(IHeaderResponse response)`: ```java References.renderWithFilter(myBootstrapSettings, response, myCustomJsReferenceHeaderItem, mySecondJsReferenceHeaderItem); ```
    static void
    #### Description renders a given header item with as a `FilteredHeaderItem` with filter name from bootstrap settings if present. #### Usage you can call this method in `renderHeader(IHeaderResponse response)`: ```java References.renderWithFilter(response, myCustomJsReferenceHeaderItem, mySecondJsReferenceHeaderItem); ```
    static void
    #### Description renders a given header item with as a `FilteredHeaderItem` with filter name from bootstrap settings if present. #### Usage you can call this method in `renderHeader(IHeaderResponse response)`: ```java References.renderWithFilter(response, myCustomJsReference, mySecondJsReference); ```

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • appendMinificationIdentifier

      public static String appendMinificationIdentifier(String referenceUrl)
      #### Description adds a ".min" extension in front of original extension if minimization is active. If filename doesn't contain an extension no ".min" part will be added.

      #### Usage ```java References.appendMinificationIdentifier(""); // = "" References.appendMinificationIdentifier(null); // = "" References.appendMinificationIdentifier("test"); // = "test" References.appendMinificationIdentifier("test.js"); // = "test.min.js" References.appendMinificationIdentifier("test.custom.js"); // = "test.custom.min.js" ```

      Parameters:
      referenceUrl - The reference url to append ".min" to
      Returns:
      file name containing ".min"
    • renderWithFilter

      public static void renderWithFilter(IHeaderResponse response, JavaScriptResourceReference... references)
      #### Description renders a given header item with as a `FilteredHeaderItem` with filter name from bootstrap settings if present. #### Usage you can call this method in `renderHeader(IHeaderResponse response)`: ```java References.renderWithFilter(response, myCustomJsReference, mySecondJsReference); ```
      Parameters:
      response - The current header response
      references - The resource references to render
    • renderWithFilter

      public static void renderWithFilter(IHeaderResponse response, JavaScriptReferenceHeaderItem... headerItems)
      #### Description renders a given header item with as a `FilteredHeaderItem` with filter name from bootstrap settings if present. #### Usage you can call this method in `renderHeader(IHeaderResponse response)`: ```java References.renderWithFilter(response, myCustomJsReferenceHeaderItem, mySecondJsReferenceHeaderItem); ```
      Parameters:
      response - The current header response
      headerItems - The header items to render
    • renderWithFilter

      public static void renderWithFilter(IBootstrapSettings settings, IHeaderResponse response, JavaScriptReferenceHeaderItem... headerItems)
      #### Description renders a given header item with as a `FilteredHeaderItem` with filter name from bootstrap settings if present. #### Usage you can call this method in `renderHeader(IHeaderResponse response)`: ```java References.renderWithFilter(myBootstrapSettings, response, myCustomJsReferenceHeaderItem, mySecondJsReferenceHeaderItem); ```
      Parameters:
      settings - The bootstrap settings
      response - The current header response
      headerItems - The header items to render