Package org.openmrs.module.htmlformentry.widget

Examples of org.openmrs.module.htmlformentry.widget.SingleOptionWidget


    } 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;
    }
   
View Full Code Here

TOP

Related Classes of org.openmrs.module.htmlformentry.widget.SingleOptionWidget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.