Skip to content

Instantly share code, notes, and snippets.

@nazartm
Created February 10, 2013 13:08
Show Gist options
  • Save nazartm/4749533 to your computer and use it in GitHub Desktop.
Save nazartm/4749533 to your computer and use it in GitHub Desktop.
Ajax example in Wicket
final Form form;
// form initialize
final TextField<String> messageField = new TextField<String>("messageField", Model.of(""));
messageField.add(new AjaxFormComponentUpdatingBehavior ("onkeyup") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
myListenerMethod();
target.addComponent(form);
}
});
form.add(messageField);
<input wicket:id="messageField" type="text" size="20" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment