use of org.eclipse.scout.rt.client.ui.form.fields.ParsingFailedStatus in project scout.rt by eclipse.
the class JsonValueField method handleUiErrorStatusChange.
protected void handleUiErrorStatusChange(JSONObject data) {
JSONObject jsonStatus = data.optJSONObject(IValueField.PROP_ERROR_STATUS);
addPropertyEventFilterCondition(IValueField.PROP_ERROR_STATUS, jsonStatus);
ParsingFailedStatus status = null;
if (jsonStatus != null) {
status = new ParsingFailedStatus(JsonStatus.toScoutObject(jsonStatus), getModel().getDisplayText());
}
setErrorStatusFromUI(status);
}
use of org.eclipse.scout.rt.client.ui.form.fields.ParsingFailedStatus in project scout.rt by eclipse.
the class AbstractDateColumnTest method setParseErrorInUI.
private void setParseErrorInUI(ITableRow row, AbstractDateColumn column) {
AbstractDateField field = (AbstractDateField) column.prepareEdit(row);
field.getUIFacade().setDisplayTextFromUI("invalid");
field.getUIFacade().setErrorStatusFromUI(new ParsingFailedStatus("Parsing failed", "invalid"));
column.completeEdit(row, field);
}
use of org.eclipse.scout.rt.client.ui.form.fields.ParsingFailedStatus in project scout.rt by eclipse.
the class CellTest method testAddRemoveMultistatus.
/**
* {@link Cell#setErrorStatus(org.eclipse.scout.rt.platform.status.IStatus)}
*/
@Test
public void testAddRemoveMultistatus() {
Cell c = new Cell();
ParsingFailedStatus errorStatus = new ParsingFailedStatus("failed", "rawString");
MultiStatus ms = new MultiStatus();
ms.add(errorStatus);
c.addErrorStatuses(ms.getChildren());
c.removeErrorStatus(ParsingFailedStatus.class);
assertNull(c.getErrorStatus());
}
Aggregations