/** * Construct. * * @param event the event this behavior will be attached to */ public AjaxEventBehavior(String event) { Args.notEmpty(event, "event"); onCheckEvent(event); this.event = event; }
/** * 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; }
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(" "); }
/** * 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; }
/** * 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); }
public static AttributeModifier replace(final String attributeName, final IModel<?> value) { Args.notEmpty((CharSequence) attributeName, "attributeName"); return new AttributeModifier(attributeName, value); }
public static AttributeModifier remove(final String attributeName) { Args.notEmpty((CharSequence) attributeName, "attributeName"); return replace(attributeName, Model.of(AttributeModifier.VALUELESS_ATTRIBUTE_REMOVE)); }
public static AttributeAppender prepend(final String attributeName, final Serializable value) { Args.notEmpty((CharSequence) attributeName, "attributeName"); return prepend(attributeName, Model.of(value)); }
public static AttributeAppender append(final String attributeName, final IModel<?> value) { Args.notEmpty((CharSequence) attributeName, "attributeName"); return new AttributeAppender(attributeName, value).setSeparator(" "); }