Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

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

Projects

Page tree
Skip to end of metadata
Go to start of metadata

All the packages are inside org.opernmrs.module.

  • draftforms contains:
    • The Java objects representing the in-memory version of the database objects. These are mostly simple fields with getters and setters, only occasionally containing more interesting methods
    • Validators: used to check the values that the user has entered on a form. These should be called from controllers after the user clicks a sumbit button and before the object is made persistent.
    • DraftFormsService: This is the interface defining the methods provided by the draft forms module. This is referenced in moduleApplicationContext.xml.
  • draftforms.db.hibernate contains the HibernateDraftFormsDAO class. This has methods that allow you to get, save and update objects in the database. The methods take as input / produce as output Java objects and either write those objects to the database or initialize the objects from values in the database. This is referenced in moduleApplicationContext.xml.
  • draftforms.extensions.html contains AdminList. This identifies the hook where the draft forms module is connected to OpenMRS. It is referenced in config.xml.
  • draftforms.impl contains DraftFormsServiceImpl. This class implements the DraftFormsService interface. This is referenced in moduleApplicationContext.xml.

In addition, web/src contains org.openmrs.module.draftforms.web.controller. This package contains the controllers that are linked to JSP pages. Every JSP page should have a corresponding controller. The controller defines the actions to take when visiting the JSP page (a GET method), submitting a form on a JSP page (a POST method) as well as methods to handle other Web page actions, like links or buttons that are not associated with Web pages. See the Controllers page for more details.

  • No labels