use of com.vaadin.v7.ui.RichTextArea in project SORMAS-Project by hzi-braunschweig.
the class ActionEditForm method addFields.
@Override
protected void addFields() {
addField(ActionDto.EVENT, ComboBox.class);
DateTimeField date = addDateField(ActionDto.DATE, DateTimeField.class, -1);
date.setImmediate(true);
addField(ActionDto.PRIORITY, ComboBox.class);
addField(ActionDto.ACTION_STATUS, OptionGroup.class);
NullableOptionGroup actionContext = addField(ActionDto.ACTION_CONTEXT, NullableOptionGroup.class);
actionContext.setImmediate(true);
actionContext.addValueChangeListener(event -> updateByActionContext());
// XXX: set visible when other contexts will be managed
actionContext.setVisible(false);
addField(ActionDto.ACTION_MEASURE, TextField.class);
TextField title = addField(ActionDto.TITLE, TextField.class);
title.addStyleName(SOFT_REQUIRED);
RichTextArea description = addField(ActionDto.DESCRIPTION, RichTextArea.class);
description.setNullRepresentation("");
description.setImmediate(true);
RichTextArea reply = addField(ActionDto.REPLY, RichTextArea.class);
reply.setNullRepresentation("");
reply.setImmediate(true);
setRequired(true, ActionDto.ACTION_CONTEXT, ActionDto.DATE, ActionDto.ACTION_STATUS);
setReadOnly(true, ActionDto.ACTION_CONTEXT, ActionDto.EVENT);
}
Aggregations