This repository was archived by the owner on May 5, 2021. It is now read-only.
File tree 1 file changed +3
-6
lines changed
sormas-ui/src/main/java/de/symeda/sormas/ui/action
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 24
24
import static de .symeda .sormas .ui .utils .LayoutUtil .locs ;
25
25
26
26
import com .vaadin .v7 .ui .ComboBox ;
27
- import com .vaadin .v7 .ui .Field ;
28
27
import com .vaadin .v7 .ui .Label ;
29
28
import com .vaadin .v7 .ui .RichTextArea ;
30
29
import com .vaadin .v7 .ui .TextField ;
@@ -162,18 +161,16 @@ private void updateByCreating() {
162
161
}
163
162
164
163
private void updateByActionContext () {
165
- NullableOptionGroup field = ( NullableOptionGroup ) getFieldGroup ().getField (ActionDto .ACTION_CONTEXT );
166
- ActionContext actionContext = (ActionContext ) field . getNullableValue () ;
164
+ Object fieldValueActionContext = getFieldGroup ().getField (ActionDto .ACTION_CONTEXT ). getValue ( );
165
+ ActionContext actionContext = fieldValueActionContext == null ? null : (ActionContext ) fieldValueActionContext ;
167
166
168
167
// context reference depending on action context
169
168
// ready for adding new context
170
169
ComboBox eventField = (ComboBox ) getFieldGroup ().getField (ActionDto .EVENT );
171
170
if (actionContext != null ) {
172
- switch (actionContext ) {
173
- case EVENT :
171
+ if (actionContext == ActionContext .EVENT ) {
174
172
FieldHelper .setFirstVisibleClearOthers (eventField );
175
173
FieldHelper .setFirstRequired (eventField );
176
- break ;
177
174
}
178
175
} else {
179
176
FieldHelper .setFirstVisibleClearOthers (null , eventField );
You can’t perform that action at this time.
0 commit comments