Hi,
I have a form and three combo box items set to that form. I have to validate the form using the results coming from server side.
I use,
form.validateData(model,new DSCallback() {
@Override
public void execute(DSResponse dsResponse, Object o, DSRequest dsRequest) {
Record record = dsResponse.getData[0];
if (record.getFlag()) {
comboBox.clearErrors();
comboBox.setShowErrorIcon(true);
comboBox.setErrors("error");
}
if (form.validate()) {
SC.say("valid");
}
}
});
First time, error setting is working. But the second time errors are not setting. You can see, I clear the errors before setting new errors.
I have a form and three combo box items set to that form. I have to validate the form using the results coming from server side.
I use,
form.validateData(model,new DSCallback() {
@Override
public void execute(DSResponse dsResponse, Object o, DSRequest dsRequest) {
Record record = dsResponse.getData[0];
if (record.getFlag()) {
comboBox.clearErrors();
comboBox.setShowErrorIcon(true);
comboBox.setErrors("error");
}
if (form.validate()) {
SC.say("valid");
}
}
});
First time, error setting is working. But the second time errors are not setting. You can see, I clear the errors before setting new errors.
Comment