コード例 #1
0
  /**
   * Construct.
   *
   * @param event the event this behavior will be attached to
   */
  public AjaxEventBehavior(String event) {
    Args.notEmpty(event, "event");

    onCheckEvent(event);

    this.event = event;
  }
コード例 #2
0
  /**
   * replaces the version string "current" with the recent available version
   *
   * @param path the full resource path
   */
  public static String useRecent(final String path) {
    Args.notEmpty(path, "path");

    if (path.matches("/webjars/[^/]*/current/.*")) {
      return path.replaceFirst("/current/", "/" + recentVersion(path) + "/");
    }

    return path;
  }
コード例 #3
0
  public static AttributeAppender prepend(final String attributeName, final IModel<?> value) {
    Args.notEmpty((CharSequence) attributeName, "attributeName");
    return new AttributeAppender(attributeName, value) {
      private static final long serialVersionUID = 1L;

      protected String newValue(final String currentValue, final String replacementValue) {
        return super.newValue(replacementValue, currentValue);
      }
    }.setSeparator(" ");
  }
コード例 #4
0
ファイル: Prefetch.java プロジェクト: b-cuts/wicket-bootstrap
 /**
  * A URL to a JSON file containing an array of datums. <strong>Required</strong>.
  *
  * @param url mandatory parameter
  * @return this instance for chaining
  */
 public Prefetch withUrl(final CharSequence url) {
   Args.notEmpty(url, "url");
   put(Url, url);
   return this;
 }
コード例 #5
0
  /**
   * Creates listener interface from the specified string
   *
   * @param interfaceName
   * @return listener interface
   */
  protected RequestListenerInterface requestListenerInterfaceFromString(String interfaceName) {
    Args.notEmpty(interfaceName, "interfaceName");

    return getContext().requestListenerInterfaceFromString(interfaceName);
  }
コード例 #6
0
 public static AttributeModifier replace(final String attributeName, final IModel<?> value) {
   Args.notEmpty((CharSequence) attributeName, "attributeName");
   return new AttributeModifier(attributeName, value);
 }
コード例 #7
0
 public static AttributeModifier remove(final String attributeName) {
   Args.notEmpty((CharSequence) attributeName, "attributeName");
   return replace(attributeName, Model.of(AttributeModifier.VALUELESS_ATTRIBUTE_REMOVE));
 }
コード例 #8
0
 public static AttributeAppender prepend(final String attributeName, final Serializable value) {
   Args.notEmpty((CharSequence) attributeName, "attributeName");
   return prepend(attributeName, Model.of(value));
 }
コード例 #9
0
 public static AttributeAppender append(final String attributeName, final IModel<?> value) {
   Args.notEmpty((CharSequence) attributeName, "attributeName");
   return new AttributeAppender(attributeName, value).setSeparator(" ");
 }