本文整理了Java中com.vaadin.ui.TextArea.commit()
方法的一些代码示例,展示了TextArea.commit()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextArea.commit()
方法的具体详情如下:
包路径:com.vaadin.ui.TextArea
类名称:TextArea
方法名:commit
暂无
代码示例来源:origin: org.aperteworkflow/base-widgets
@Override
public void commit() throws SourceException, Validator.InvalidValueException {
rawText.commit();
}
代码示例来源:origin: org.aperteworkflow/base-widgets
private void validateAndSave() throws Validator.InvalidValueException {
if (code.getValue() == null || ((String) code.getValue()).trim().isEmpty()) {
commit();
return;
}
try {
ScriptProcessorRegistry registry = ProcessToolContext.Util.getThreadProcessToolContext().getRegistry().lookupService(
ScriptProcessorRegistry.class.getName());
Property scriptType = formProperties.get("scriptEngineType");
if (scriptType == null || scriptType.getValue() == null || ((String) scriptType.getValue()).isEmpty())
throw new Validator.InvalidValueException("script.undefined.type");
ScriptProcessor scriptProcessor = registry.getScriptProcessor((String) scriptType.getValue());
if (scriptProcessor == null)
throw new Validator.InvalidValueException("script.processor.not.found");
InputStream is = new ByteArrayInputStream(((String) code.getValue()).getBytes());
scriptProcessor.validate(is);
code.commit();
showInfoNotification("validation.script.ok");
} catch (Validator.InvalidValueException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
showWarningNotification(e.getMessage(), null);
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
showWarningNotification("validation.script.error", e.getMessage());
}
}
代码示例来源:origin: org.opennms.features/vaadin-snmp-events-and-metrics
@Override
public void buttonClick(ClickEvent event) {
if (event.getButton().equals(save)) {
if (editor.isReadOnly()) {
Notification.show("Unsupported action for readOnly viewer.", Notification.Type.WARNING_MESSAGE);
} else {
editor.commit();
logger.info("The file " + file + " has been changed.");
}
}
if (event.getButton().equals(cancel)) {
if (!editor.isReadOnly())
logger.info("The file editing has been canceled.");
editor.discard();
}
close();
}
内容来源于网络,如有侵权,请联系作者删除!