On Tue, 26 May 2009 16:27:18 +0200
Dorothée Giernoth wrote:
> Now I want to write the changed information from these labels back
> into the database after the content has changed. Wouldn't be too much
> of a problem if I knew how to retrieve the changed value from the
> label. I really have no clue how to do that!
Override the onSubmit() method, like this (untested, but you get the
gist):
cell.add(new AjaxEditableLabel(cell.newChildId(), new Model(...)) {
protected void onSubmit(AjaxRequestTarget target) {
super.onSubmit(target);
String value = getDefaultModelObject();
// persist value here...
}
});
Alternatively, if you keep a reference to the model you pass to the
AjaxEditableLabel, you can read its contents at some other point.
Grüße
Carl-Eric
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org