I am trying to learn Wicket. One of the problems I am facing is changing the values of components, such as a label.
This is how I declare a label:
Label message = new Label("message", new Model<String>(""));
message .setOutputMarkupId(true);
add(message );
The only solution I can find:
Label newMessage= new Label(message.getId(), "MESSAGE");
newMessage.setOutputMarkupId(true);
message.replaceWith(newMessage);
target.add(newMessage);
Is there a better / easier way to edit the value of the Wicket tag and display this new value to the user?
Thank!
source
share