use of com.haulmont.cuba.security.entity.SessionAttribute in project cuba by cuba-platform.
the class SessionAttributeEditor method commitAndClose.
@Override
public void commitAndClose() {
SessionAttribute item = datasource.getItem();
if (item.getStringValue() != null) {
Datatype dt = Datatypes.get(item.getDatatype());
try {
Object object = dt.parse(item.getStringValue());
item.setStringValue(object == null ? "" : object.toString());
} catch (IllegalArgumentException | ParseException e) {
showNotification(getMessage("unableToParseValue"), NotificationType.ERROR);
return;
}
}
super.commitAndClose();
}
Aggregations