1

I need to use wicketstuff's StatelessAjaxSubmitLink but I can't find any way to customize the default label ("Submit Query"). The class does not inherit a setLabel() method. Is there a way how to get around this?

krenkz
  • 484
  • 6
  • 15

1 Answers1

2

I guess you're looking for setBody.

UPDATE

If you are using your component with a HTML tag <input type="submit"/> , than you should use value attribute to set you desired label. In Wicket use AttributeAppender:

yourLink.add(AttributeAppender.append("value", "foo bar"));

See https://ci.apache.org/projects/wicket/guide/7.x/single.html#_modifing_tag_attributes

Andrea Del Bene
  • 2,521
  • 1
  • 15
  • 20
  • I tried to use it, but I get a runtime error, possibly because I am trying to use it with input? `Expected close tag for '' Possible attempt to embed component(s) '' in the body of this component which discards its body` – krenkz Feb 21 '21 at 18:23
  • 1
    I've updated the answer for you specific case. Check it out! – Andrea Del Bene Feb 21 '21 at 20:24