OpenMRS Module

(Inserting a Link to the module to Adminpage)
(Inserting a Link to the module to Adminpage)
Line 20: Line 20:
  map.put("module/yourmodulename/somepage.htm", "some link text");
  map.put("module/yourmodulename/somepage.htm", "some link text");
-
*To setup your simple module to display text or functions, under your <b>web</b> folder -> module -> <i> create a <b> somepage.jsp</b> file </i>
+
*To setup your simple module to display text or functions, under your <b>web</b> folder &rarr;  module &rarr <i> create a <b> somepage.jsp</b> file </i>

Revision as of 21:53, 6 July 2007

The OpenMRS system supports a module system. Modules are compiled into jar files with an .omod suffix and stored in the modules directory.

Creating a simple module

To first setup and create a simple module follow the first five steps in OpenMRS's guide.

Inserting a Link to the module to Adminpage

  • In your config.xml file under metadata folder uncomment the section titled <!-- Extensions -->,
<!-- Extensions -->

<extension>
<point>org.openmrs.admin.list</point>
<class>@MODULE_PACKAGE@.extension.html.AdminList</class>
</extension>
<!-- /Extensions -->
  • Be sure to that your replace all references to basicmodule with the new name of your project which you may select.
  • Switch into Java perspective which is located in the upper right hand corner of eclispe below the eixt botton.
  • Edit your AdminList.java file in extention html to insert this line of code in to the function public Map<String, String> getLinks()

before your return the map but after you declare it.

map.put("module/yourmodulename/somepage.htm", "some link text");
  • To setup your simple module to display text or functions, under your web folder → module &rarr create a somepage.jsp file