how to add a tab to the patient dashboard

2 views
Skip to first unread message

awanth sen

unread,
Nov 28, 2013, 4:03:46 AM11/28/13
to d...@openmrs.org
Hi,

I want to add a tab to the patient dashboard from my module.

I have followed this answer: https://answers.openmrs.org/questions/373/how-can-i-add-a-tab-in-the-patient-dashboard

and added an extension html class with :
        @Override
        public String getPortletUrl() {
            return "dashboardtabforid";
        }
      
        @Override
        public String getTabId() {
            return "dashboardtabforid";
        }

and added the extension point to the config file like this

<extension> <point>org.openmrs.patientDashboardTab</point> <class>@MODULE_PACKAGE@.extension.html.DashboardTabForID</class> </extension>

then i have created the controller with

@Controller
@RequestMapping("**/dashboardtabforid.portlet")
public class DashboardTabForIDController  {

but i dont get a tab appearing in the patient dashboard, what am I doing wrong here?

thanks
Awanthika



Daniel Kayiwa

unread,
Nov 28, 2013, 5:54:42 AM11/28/13
to dev
Does your extension class subclass PatientDashboardTabExt?


--
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/

To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@openmrs.org.



--
If we keep uppermost in our minds the unkind and unjust acts of others, we shall find it impossible to love them as Christ has loved us; but if our thoughts dwell upon the wondrous love and pity of Christ for us, the same spirit will flow out to others.

Joaquín Blaya

unread,
Nov 28, 2013, 6:18:52 AM11/28/13
to d...@openmrs.org
Also, awanth, if you see that the answer is missing something please add it on the wiki. Thanks.


Joaquín
___________________________________________________________________
Gerente de Desarrollo, eHealth Systems
Research Fellow, Escuela de Medicina de Harvard
Moderador, GHDOnline.org

Lluis Martinez

unread,
Nov 28, 2013, 7:56:38 AM11/28/13
to d...@openmrs.org
As explained here https://wiki.openmrs.org/display/docs/Module+Extension+Points

It would be great if the extension engine shows a warning if something
is not correct (instead of failing silently).

awanth sen

unread,
Nov 28, 2013, 11:03:08 PM11/28/13
to d...@openmrs.org
Hi Kayiwa

Im sorry that i dont get you clearly here. my class extends dashboardext as follows,

public class DashboardTabForID  extends PatientDashboardTabExt { }


------------------------------------------------------------------------------------------->>
AWANTHIKA SENARATH
Undergraduate
Department of Electronics and Telecommunication Engineering
University of Moratuwa

Daniel Kayiwa

unread,
Nov 29, 2013, 3:13:36 AM11/29/13
to dev
Is your module some where like github for us to look at?

awanth sen

unread,
Nov 29, 2013, 3:54:39 AM11/29/13
to d...@openmrs.org
No it is not, but i cant load it there..

Hi all,

Is there a guide in Wiki on the complete process we have to follow on getting a dashboard extension done/

give me five minutes, i will load it there and give the link

awanth sen

unread,
Nov 29, 2013, 4:23:48 AM11/29/13
to d...@openmrs.org
this is the git hub URL to my code..
thanks
Awanthika

Daniel Kayiwa

unread,
Nov 29, 2013, 8:05:27 AM11/29/13
to dev
If you look at your tomcat log, you will see something like this:

WARN - Module.expandExtensionNames(534) |2013-11-29 15:57:47,070| Unable to load class for extension: org.openmrs.patientDashboardTab
java.lang.ClassNotFoundException: @MODULE_PACKAGE@.extension.html.DashboardTabForID
    at

So, in your config.xml, replace: @MODULE_PACKAGE@
with: ${project.parent.groupId}.${project.parent.artifactId}


--
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/

awanth sen

unread,
Nov 30, 2013, 1:37:42 AM11/30/13
to d...@openmrs.org
thanks Dkayiwa, I will do that..

Regards
Awanthika


To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@openmrs.org.
Reply all
Reply to author
Forward
0 new messages