Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

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
<dwr>
		<allow>
			<create creator="new" javascript="DWRMyModuleService">
				<param name="class" value="<at:var at:name="MODULE_PACKAGE" />@MODULE_PACKAGE@.web.DWRMyModuleService"/>
				<include method="getAllLocations"/>
			</create>
		</allow>

		<signatures>
			<![CDATA[
			import <at:var at:name="MODULE_PACKAGE" />@MODULE_PACKAGE@.web.DWRMyModuleService;
			DWRMyModuleService.getAllLocations();
			]]>
		</signatures>
	</dwr>

...