Can not test the New Module Created

Hello all,

Who can help with this error please ? I thought the reason was because patient was null but after adding patient it still does not work when click on the module in the admin interface.


Hey , The Error is not because of patient its caused by users. you are not passing object with name users to your gsp page.

model.addAttribute("users", here_your_object);

1 Like

Thank you @vankineenitawrun ! I will check that and let you know how things go.

Hello @vankineenitawrun, can you help with adding validation to assess user input when the controller is triggered. Considering the department module in the devmanual documentation. Thanks

you can do validation by having javascript or jquery in tag

Hello @vankineenitawrun, thank you for getting back to me. Is there any simple documentation or very basic project which can help me. I am new to Spring MVC and I just start learning it but I would like to get this very first module from the dev manual up.

Thank you so much @vankineenitawrun !

hey you need to have it in fragmentcontroller thats the issue I can see. Please put your fragmentcontroller code on pastebin and can share link.

1 Like

The fragment controller is

Sorry wrong code Here it is

This is your gsp page correspondingly you need to have a fragmentcontroller java class. example if you have page1.gsp then in you need to have a java file with name Page1FragmentController in org.openmrs.module.yourmoudleid.fragment.contoller package.

1 Like

I get you. Very clear ! Thank you

But seems my fragment controller is correct. Maybe I have to look up another controller somewhere else.

please share the path of both gsp page and fragmentcontroller

1 Like

The gsp page:

The fragment controller page:

Hey not the link. Directory path to files like

gsp page at


and your fragment controller at


make sure you are having them in the same way.

1 Like

The gsp page: C:\openmrs\department\omod\src\main\webapp\fragments

The fragment controller: C:\openmrs\department\omod\src\main\java\org\openmrs\module\department\fragment\controller

Hey have you made any changes after creating the module?

1 Like