Advertisement
Guest User

Untitled

a guest
Nov 12th, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. my controller -
  2.  
  3. @Controller
  4. public class Hl7TestController {
  5.  
  6. @RequestMapping(value="/module/rheashradapter/test")
  7. public void showSettings(ModelMap model) {
  8. //Display settings
  9. }
  10. }
  11. -------------------------------------------
  12.  
  13. AdminList.java
  14.  
  15. public Map<String, String> getLinks() {
  16.  
  17. Map<String, String> map = new LinkedHashMap<String, String>();
  18. map.put("module/rheashradapter/test.form", "test");
  19.  
  20. return map;
  21. }
  22. -------------------------------------------
  23.  
  24. The test.jsp lives inside src/main/webapp of RHEASHRadapter-omod
  25. -------------------------------------------
  26.  
  27. My moduleApplicationContext file is :
  28.  
  29. <?xml version="1.0" encoding="UTF-8"?>
  30.  
  31. <!-- Beans to add to the current Application context definition -->
  32.  
  33. <beans xmlns="http://www.springframework.org/schema/beans"
  34. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  35. xmlns:context="http://www.springframework.org/schema/context"
  36. xmlns:util="http://www.springframework.org/schema/util"
  37. xsi:schemaLocation="http://www.springframework.org/schema/beans
  38. http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  39. http://www.springframework.org/schema/context
  40. http://www.springframework.org/schema/context/spring-context-2.5.xsd
  41. http://www.springframework.org/schema/util
  42. http://www.springframework.org/schema/util/spring-util-2.0.xsd">
  43.  
  44. <bean parent="serviceContext">
  45. <property name="moduleService">
  46. <list>
  47. <value>org.openmrs.module.rheashradapter.api.LogEncounterService</value>
  48. <bean class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
  49. <property name="transactionManager"><ref bean="transactionManager"/></property>
  50. <property name="target">
  51. <bean class="org.openmrs.module.rheashradapter.api.LogEncounterServiceImpl">
  52. <property name="logEncounterDAO">
  53. <bean class="org.openmrs.module.rheashradapter.hibernate.LogEncounterDAOImpl" autowire="byType">
  54. <property name="sessionFactory"><ref bean="sessionFactory" /></property>
  55. </bean>
  56. </property>
  57. </bean>
  58. </property>
  59. <property name="preInterceptors">
  60. <ref bean="serviceInterceptors" />
  61. </property>
  62. <property name="transactionAttributeSource">
  63. <bean class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"/>
  64. </property>
  65. </bean>
  66. </list>
  67. </property>
  68. </bean>
  69. <bean id="RHEApatientController" class="org.openmrs.module.rheashradapter.web.controller.RHEApatientController"/>
  70. </beans>
  71.  
  72.  
  73. Q1) is it because the controller for test.jsp is not defined as a bean in the ModuleApplicationContext ?
  74. Q2) is it because the difference in capitals ? (rheashradapter vs RHEASHRadapter , the module name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement