I try to update the database as soon as I change RichTextBoxand exit RichTextBox(i.e. I do not want to force the user to click the "Update" button). However, my code throws an exception The method addValueChangeHandler(new ValueChangeHandler<String>(){}) is undefined for the type RichTextAreain the first line.
textBoxExistingDescription.addValueChangeHandler(new ValueChangeHandler<String>() {
public void onValueChange(ValueChangeEvent<String> event) {
if (ymAwardDetails.getYmsdId() != null) {
AsyncCallback<Void> callback = new YMSpecificHandler<Void>(ScoutAwardView.this);
rpc.updateYMSpecific(ymAwardDetails.getYmsdId(), ymAwardDetails.getYmsdDetail(), callback);
}else{
AsyncCallback<Void> callback = new YMSpecificHandler<Void>(ScoutAwardView.this);
rpc.addYMSpecific(youthMemberID, ymAwardDetails.getAdId(), ymAwardDetails.getYmsdDetail(), callback);
}
}
});
Is there an alternative way to do this, please?
source
share