} else if (tagParams.getType().equals("checkbox")) {
// there is only one state
Entry<String, ProgramWorkflowState> state = states.entrySet().iterator().next();
widget = new CheckboxWidget(state.getKey(), state.getValue().getUuid());
} else {
SingleOptionWidget singleOption;
if (tagParams.getType().equals("dropdown")) {
singleOption = new DropdownWidget();
singleOption.addOption(new Option("", "", false));
} else {
singleOption = new RadioButtonsWidget();
}
for (Entry<String, ProgramWorkflowState> state : states.entrySet()) {
boolean select = state.getValue().equals(currentState);
singleOption.addOption(new Option(state.getKey(), state.getValue().getUuid(), select));
}
widget = singleOption;
}