Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited link to dwr.xml

...

OpenMRS uses dwr for AJAX. In a sentence, dwr converts java objects to javascript and vice versa.

DWR in core openmrs

Using DWR in a JSP page

Code Block
<script src="<openmrs:contextPath/>/dwr/interface/DWRPatientService.js"></script>
<script>

DWRPatientService.findPatients("John", false, objectsFound);

function objectsFound(patients) {
  alert("There are " + patients.length + " patients named john");
}

</script>

...