コード例 #1
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(" ");
  }
コード例 #2
0
 public static AttributeModifier replace(final String attributeName, final IModel<?> value) {
   Args.notEmpty((CharSequence) attributeName, "attributeName");
   return new AttributeModifier(attributeName, value);
 }
コード例 #3
0
 public AttributeModifier(final String attribute, final IModel<?> replaceModel) {
   super();
   Args.notNull((Object) attribute, "attribute");
   this.attribute = attribute;
   this.replaceModel = replaceModel;
 }
コード例 #4
0
 public static AttributeModifier remove(final String attributeName) {
   Args.notEmpty((CharSequence) attributeName, "attributeName");
   return replace(attributeName, Model.of(AttributeModifier.VALUELESS_ATTRIBUTE_REMOVE));
 }
コード例 #5
0
 public static AttributeAppender prepend(final String attributeName, final Serializable value) {
   Args.notEmpty((CharSequence) attributeName, "attributeName");
   return prepend(attributeName, Model.of(value));
 }
コード例 #6
0
 public static AttributeAppender append(final String attributeName, final IModel<?> value) {
   Args.notEmpty((CharSequence) attributeName, "attributeName");
   return new AttributeAppender(attributeName, value).setSeparator(" ");
 }