How to set label to StatelessAjaxSubmitLink?

61 Views Asked by At

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?

1

There are 1 best solutions below

2
Andrea Del Bene On BEST ANSWER

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