Versions Compared

Key

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

...

Code Block
@Controller
@RequestMapping("**/this.portlet")
public class ThisPortletController extends PortletController {
    
    private static final Log log = LogFactory.getLog(ThisPortletController.class);
    @SuppressWarnings("unchecked")
    @Override
    protected void populateModel(HttpServletRequest request, Map<String, Object> model) {
// your code here
    }
}

Make sure the following line exists in your ModuleApplicationContext.xml file, substituting your module name for ModuleID.  It typically is put just above the </beans> tag at the end.

...

Module portlets are defined in the omod/src/main/webapp/portlets folder.  In our example, the portlet would be named this.jsp.  The code inside of a portlet shouldn't have to differ from a standard OpenMRS portlet, meaning that it looks exactly like a jsp (or part of a jsp).

...