TRUNK-3818 Intro Ticket--Question from Beginner Java Contributor

0 views
Skip to first unread message

Susan Tan

unread,
May 7, 2013, 2:26:34 AM5/7/13
to d...@openmrs.org

Hi All, 

I'm a beginner volunteer contributor; I think OpenMRS is really cool, after having read about it through on the GNOME projects website. I'm fairly new to Java and am eager to learn more Java in my free time, so I've picked and claimed my 1st intro ticket here

I git-forked and git-cloned the forked copy of the openMRS-core into my local repo. I have maven installed; I can run the clean install and jetty run in order to run the webapp directory on my local server. MySQL db and OpenMRS account are already set up. I have a git branch (made from master) called TRUNK-3818.

The next step: I want to make simple html changes to the relevant url "http://0.0.0.0:8080/openmrs/dictionary/concept.form". The 1st thing is to find out the html or jsp file that renders the concept.form page. I want to make a simple test change--such as changing the headline text of "Creating new concept" in the concept.form page to "Hello World! My name is Susan" just to get an idea of the workflow for making a very minor change to the jsp file. Message.properties file seems to be a good place to start changing the pre-defined names variables. Do you think so? If so, do I need to do maven clean install and maven jetty:run again on that git branch I've made? I've been using Sublime Text2 and running maven on command line, as indicated in the step-by-step tutorial.

One of the biggest challenges for me so far is to find out which servlet renders which jsp, which java file is responsible for doing what, etc. I've been mostly been relying on the Chrome inspect element tool to look at html unique strings and then trace back to the relevant java or jsp file. Does anyone have hints on how to make this process of finding the relevant files easier? 
 

Nyoman Ribeka

unread,
May 7, 2013, 2:13:42 PM5/7/13
to OpenMRS Dev
Susan,

If you look at the URL of the page you're viewing, you can (most of the time) easily find out which jsp is being rendered and which controller is backing that jsp page. For example if you look at the:
<server>/openmrs/patientDashboard.form (this is the page where you view a patient data).
- The jsp will be: patientDashboardForm.jsp
- The controller will be: PatientDashboardController.java

The convention for this naming is here:
https://wiki.openmrs.org/display/docs/Conventions


 

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



--
Thanks,

- Nyoman Ribeka

Susan Tan

unread,
May 11, 2013, 2:35:07 PM5/11/13
to d...@openmrs.org
Thanks Nyoman! I've found the relevant jsp and java controller files. 

I want to start on the 3rd item (the easiest-looking item) of this ticket: https://tickets.openmrs.org/browse/TRUNK-3818#comment-197810 I can use a separate JS file to check the user's input inside the form as a 1st step. I'm not sure what to check the user input against (how do I bring java into this implementation)? I'm new to Java; can you point me in the right direction on what the roadmap looks like for this task? 

Robert

unread,
May 11, 2013, 10:14:54 PM5/11/13
to OpenMRS Dev Mailing List
Hi Susan,

I would take a look at some of the validator classes. My guess is you will need to edit the ConceptValidator.java

Robert


On 13-05-11 11:35 AM, Susan Tan wrote:
Thanks Nyoman! I've found the relevant jsp and java controller files. 

I want to start on the 3rd item (the easiest-looking item) of this ticket: https://tickets.openmrs.org/browse/TRUNK-3818#comment-197810 I can use a separate JS file to check the user's input inside the form as a 1st step. I'm not sure what to check the user input against (how do I bring java into this implementation)? I'm new to Java; can you point me in the right direction on what the roadmap looks like for this task? 

--

Wyclif Luyima

unread,
May 12, 2013, 12:42:19 AM5/12/13
to Developers
Hi Susan,

If you want to do the validation via Java, you need to edit ConceptFormValidator and bind the error to duplicate name for it to get displayed next to it in the form, this might be tricky to do if you are new to Spring MVC, that concept form is fairly complex to actually achieve this for a beginner but you can if you look at the code in that validator and do something similar or read a little more about spring MVC and form validation specifically.
If you want to do it via JS, you can include the scripts at the top of conceptForm.jsp or the already existing conceptForm.js file.

Wyclif


On Sat, May 11, 2013 at 2:35 PM, Susan Tan <onceuponat...@gmail.com> wrote:
Thanks Nyoman! I've found the relevant jsp and java controller files. 

I want to start on the 3rd item (the easiest-looking item) of this ticket: https://tickets.openmrs.org/browse/TRUNK-3818#comment-197810 I can use a separate JS file to check the user's input inside the form as a 1st step. I'm not sure what to check the user input against (how do I bring java into this implementation)? I'm new to Java; can you point me in the right direction on what the roadmap looks like for this task? 

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



--
Wyclif Luyima
Regenstrief Institute Inc.

Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from making further disclosure of such information without the specific written consent of the person to whom the information pertains or as otherwise permitted by such regulations. A general authorization for the release of medical or other information is not sufficient for this purpose.

If you have received this message in error, please notify the sender by return e-mail and delete the original message. Any retention, disclosure, copying, distribution or use of this information by anyone other than the intended recipient is strictly prohibited.

Lluis Martinez

unread,
May 12, 2013, 6:49:43 AM5/12/13
to d...@openmrs.org
Doing it in JS implies an Ajax call (using DWR I guess) and is even
more complex.
Reply all
Reply to author
Forward
0 new messages