-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prov 103 [issue](https://issues.openmrs.org/browse/PROV-103) #45
Changes from 26 commits
3085d83
ca18092
76e8d3a
ed24628
a0b912a
151358d
28113a3
ae537e7
3e3b91a
0155b32
3009579
e0182c3
d56f6eb
15cb82f
0a4101b
721c688
209a1ae
cd585a3
492870f
2e216f5
2d9e86e
79d7459
d4e05db
88dae7a
ddef0be
4e20d3a
b5e83a5
14d33cc
645eebe
c2d83c9
fb0b080
746194f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<parent> | ||
<groupId>org.openmrs.module</groupId> | ||
<artifactId>providermanagement</artifactId> | ||
<version>2.14.0-SNAPSHOT</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this version change for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i was reacting to this comment, and was restoring the prevoius version before my commits |
||
<version>2.15.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>providermanagement-omod</artifactId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,40 @@ | |
|
||
package org.openmrs.module.providermanagement.fragment.controller; | ||
|
||
import org.openmrs.layout.web.name.NameSupport; | ||
import java.lang.reflect.Method; | ||
|
||
import org.openmrs.ui.framework.fragment.FragmentModel; | ||
|
||
public class PersonNameFragmentController { | ||
|
||
public void controller(FragmentModel model) { | ||
model.addAttribute("layoutTemplate", NameSupport.getInstance().getDefaultLayoutTemplate()); | ||
public void controller(FragmentModel model)throws Exception { | ||
|
||
/* | ||
* backward compatibility | ||
* dynamic class loading and reflection to interact with classes that provide layout templates for perso names in the system, allowing for flexibility and extensibility in managing name layouts. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not see value added by this comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hello @dkayiwa i have made some changes please find them in the commit below |
||
* using classloader to call the NameSupport classes creating an instance | ||
* using reflection method to access and invoke the methods of NameSupport class | ||
*/ | ||
Class<?> nameSupport; | ||
|
||
try { | ||
nameSupport = Class.forName("org.openmrs.layout.name.NameSupport"); | ||
} catch (ClassNotFoundException e) { | ||
nameSupport = Class.forName("org.openmrs.layout.web.name.NameSupport"); | ||
} | ||
|
||
if (nameSupport == null) { | ||
return; | ||
} | ||
|
||
Method getInstance = nameSupport.getDeclaredMethod("getInstance"); | ||
Object instance = getInstance.invoke(null); | ||
|
||
Method getLayoutTemplate = nameSupport.getMethod("getDefaultLayoutTemplate"); | ||
Object layoutTemplate = getLayoutTemplate.invoke(instance); | ||
|
||
model.addAttribute("layoutTemplate", layoutTemplate); | ||
|
||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
<groupId>org.openmrs.module</groupId> | ||
<artifactId>providermanagement</artifactId> | ||
<version>2.14.0-SNAPSHOT</version> | ||
<version>2.15.0-SNAPSHOT</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this version change for? |
||
<packaging>pom</packaging> | ||
<name>Provider Management Module</name> | ||
<description>Allows for the creation of provider roles, as well as the management of provider/provider and provider/patient relationships.</description> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not expect version changes to be part of this pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it think the verion i forked is base on 2.15.0- snapshot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check what the current upstream version is.