J'essaie de mettre à jour la base de données une fois que j'ai changé le RichTextBox
et que j'ai quitté le RichTextBox
(ie, je ne veux pas forcer l'utilisateur à appuyer sur "). Cependant, mon code renvoie l'exception The method addValueChangeHandler(new ValueChangeHandler<String>(){}) is undefined for the type RichTextArea
sur la première ligne.GWT addValueChangeHandler à RichTextBox n'est pas autorisé, un autre moyen requis
textBoxExistingDescription.addValueChangeHandler(new ValueChangeHandler<String>() {
public void onValueChange(ValueChangeEvent<String> event) {
//If a record for this Youth Member specific detail line exists then update it else add it.
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);
}
}
});
Existe-t-il une autre façon de procéder?
J'ai implémenté la solution de @RAS (merci RAS) et, après beaucoup de tests, cela fonctionne pour moi sans la minuterie. Merci quand même Pomah. – Glyn