This repository was archived by the owner on May 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
sormas-ui/src/main/java/de/symeda/sormas/ui/action Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 2424import static de .symeda .sormas .ui .utils .LayoutUtil .locs ;
2525
2626import com .vaadin .v7 .ui .ComboBox ;
27- import com .vaadin .v7 .ui .Field ;
2827import com .vaadin .v7 .ui .Label ;
2928import com .vaadin .v7 .ui .RichTextArea ;
3029import com .vaadin .v7 .ui .TextField ;
@@ -162,18 +161,16 @@ private void updateByCreating() {
162161 }
163162
164163 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 ;
167166
168167 // context reference depending on action context
169168 // ready for adding new context
170169 ComboBox eventField = (ComboBox ) getFieldGroup ().getField (ActionDto .EVENT );
171170 if (actionContext != null ) {
172- switch (actionContext ) {
173- case EVENT :
171+ if (actionContext == ActionContext .EVENT ) {
174172 FieldHelper .setFirstVisibleClearOthers (eventField );
175173 FieldHelper .setFirstRequired (eventField );
176- break ;
177174 }
178175 } else {
179176 FieldHelper .setFirstVisibleClearOthers (null , eventField );
You can’t perform that action at this time.
0 commit comments