Search in sources :

Example 1 with RichTextArea

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);
}
Also used : NullableOptionGroup(de.symeda.sormas.ui.utils.NullableOptionGroup) RichTextArea(com.vaadin.v7.ui.RichTextArea) TextField(com.vaadin.v7.ui.TextField) DateTimeField(de.symeda.sormas.ui.utils.DateTimeField)

Aggregations

RichTextArea (com.vaadin.v7.ui.RichTextArea)1 TextField (com.vaadin.v7.ui.TextField)1 DateTimeField (de.symeda.sormas.ui.utils.DateTimeField)1 NullableOptionGroup (de.symeda.sormas.ui.utils.NullableOptionGroup)1