Add portlet to Patient Dashboard

0 views
Skip to first unread message

Che-Wei Kuo

unread,
May 21, 2013, 10:39:24 AM5/21/13
to d...@openmrs.org
Hi all,

I'm trying to add a portlet to patient dashboard follow household module.

the problem that bothers me is set the controller in moduleApplicationContext , I have no idea how to solve the error in surefire-reports file.

When I try to add the controller , after mvn install i get the problem like this

<bean id="dicomecgUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="order"><value>2</value></property>
<property name="mappings">
<props>
<prop key="**/dicomecg.portlet">dicomEcgPortletController</prop>
</props>
</property>
</bean>

<bean id="dicomEcgPortletController" class="org.openmrs.module.dicomecg.web.controller.DicomEcgPortletController">
</bean>

I know when i add 
<property name="mappings">
<props>
<prop key="**/dicomecg.portlet">dicomEcgPortletController</prop>
</props>
</property>
or single bean i will get the error
<bean id="dicomEcgPortletController" class="org.openmrs.module.dicomecg.web.controller.DicomEcgPortletController">
</bean>

wondering to know is there some import things i missed?

thanks

Here is my GitHub



Amir Buzo

unread,
May 21, 2013, 10:41:30 AM5/21/13
to d...@openmrs.org
first make sure you declare the extension in the config. file 






--
OpenMRS Developers: http://go.openmrs.org/dev
Post: d...@openmrs.org
Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 



--
Amir Buzo
Software Engineer 
IT Solutions

Linneaus University (Vaxjo)
Faculty of Science and Engineering
School of Computer Science, Physics and Mathematics.
MSc in Software Technology 
Sweden 

University of Sheffield (Thessaloniki)
Department of Computer Science.
BSc in Computer Science.
Greece.

Amir Buzo

unread,
May 21, 2013, 10:43:52 AM5/21/13
to d...@openmrs.org


       <extension>

       <point>org.OpenMRS.patientDashboardTab</point> <class>@MODULE_PACKAGE@.extension.html.PatientDashboardForAntecedentesPersonales</class>

       </extension>


 <bean id="patientimageUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">

        <property name="order"><value>2</value></property>

        <property name="mappings">

            <props>

                <prop key="module/@MODULE_ID@/portlets/patientSummaryForm.portlet">patientPortletController</prop>

            </props>

        </property>

    </bean>

          <bean id="patientPortletController" class="@MODULE_PACKAGE@.web.controller.PatientPortletController" />
try do do something similar my friend :)

Che-Wei Kuo

unread,
May 21, 2013, 10:48:23 AM5/21/13
to d...@openmrs.org


Che-Wei Kuo於 2013年5月21日星期二UTC+8下午10時39分24秒寫道:

Darius Jazayeri

unread,
May 21, 2013, 10:51:22 AM5/21/13
to dev
The problem is that you define the portlet controller class in the web layer, but you're trying to instantiate a bean in the API layer.

Move the bean definition and handler mapping to the webModuleApplicationContext.xml file under omod.

-Darius

PS- You should set a .gitignore for the target folders -- you shouldn't be committing all that failed test output to github.




Che-Wei Kuo於 2013年5月21日星期二UTC+8下午10時39分24秒寫道:

Che-Wei Kuo

unread,
May 21, 2013, 10:54:16 AM5/21/13
to d...@openmrs.org
thank you, i make sure already add the extension in the config file 

because i have show a table in my patient board succeed

after this step go to set the controller

i will try to follow patient image module set controller


2013/5/21 Amir Buzo <amir...@gmail.com>

Che-Wei Kuo

unread,
May 21, 2013, 11:15:46 AM5/21/13
to d...@openmrs.org
Thank you very much, Darius 

I'll try to understand what different



2013/5/21 Che-Wei Kuo <wwakeu...@gmail.com>

Che-Wei Kuo

unread,
May 22, 2013, 12:32:59 PM5/22/13
to d...@openmrs.org
hi,Darius 
would you show me link page or examples about how to distinguish moduleApplicationContext 
and webModuleApplicationContext.

So far , I know mapping the jsp page in webModuleApplicationContext.
Mapping in moduleApplicationContext the java page with the program processing in the API layer.

But,I do not understand when I use jsp and java page at the same time
the bean mapping according what?

because patient image module and household module mapping in moduleApplicationContext

thanks






2013/5/21 Che-Wei Kuo <wwakeu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages