Package org.openmrs.propertyeditor

Examples of org.openmrs.propertyeditor.ConceptEditor


  @InitBinder
  public void initBinder(WebDataBinder binder) {
    binder.registerCustomEditor(ConceptClass.class,
        new ConceptClassEditor());
    binder.registerCustomEditor(Concept.class, new ConceptEditor());
  }
View Full Code Here


    } else if (Double.class.isAssignableFrom(clazz)) {
      return Double.valueOf(val);
    } else if (Integer.class.isAssignableFrom(clazz)) {
      return Integer.valueOf(val);
    } else if (Concept.class.isAssignableFrom(clazz)) {
      ConceptEditor ed = new ConceptEditor();
      ed.setAsText(val);
      return ed.getValue();
        } else if (Drug.class.isAssignableFrom(clazz)) {
            DrugEditor ed = new DrugEditor();
            ed.setAsText(val);
            return ed.getValue();
        } else if (Patient.class.isAssignableFrom(clazz)) {
      PatientEditor ed = new PatientEditor();
      ed.setAsText(val);
      return ed.getValue();
    } else if (Person.class.isAssignableFrom(clazz)) {
      PersonEditor ed = new PersonEditor();
      ed.setAsText(val);
      return ed.getValue();
    } else if (EncounterType.class.isAssignableFrom(clazz)) {
      EncounterTypeEditor ed = new EncounterTypeEditor();
      ed.setAsText(val);
      return ed.getValue();
    } else {
      return val;
    }
  }
View Full Code Here

TOP

Related Classes of org.openmrs.propertyeditor.ConceptEditor

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.