Looks like as part of https://tickets.openmrs.org/browse/TRUNK-408, Mike
deprecated a DWR method and added a new one that only differed in one
argument. (And in CR-TRUNK-140 both Ben and I failed to catch that.)

So Greg, if you remove the deprecated version of the method in
DWRProgramWorkflowService, that should fix things. Right?

-Darius

PS- Created https://tickets.openmrs.org/browse/TRUNK-2517 about seeing if we
can automatically test for @Deprecated DWR methods.

On Thu, Aug 4, 2011 at 11:50 PM, Ben Wolfe <[email protected]> wrote:

> DWR should not allow multiple methods with the same name.  Are you
> seeing warnings about this at startup?  The reason is that javascript
> method calls can have variable number of arguments, so it just calls
> the first method it sees with that method name regardless of how many
> params you are giving it.  Extra parameters are dropped and missing
> parameters are taken to be null.
>
> Ben
>
> On Fri, Aug 5, 2011 at 9:34 AM, Greg Warren <[email protected]>
> wrote:
> > I discovered there was another deprecated updatePatientProgram method
> that
> > appears to be getting called.  Deleting this method fixes both problems
> #2
> > and 3.  Why does the wrong method get called?
> >
> > @Deprecated
> >     public void updatePatientProgram(Integer patientProgramId, String
> > enrollmentDateYmd, String completionDateYmd)
> >             throws ParseException {
> >         updatePatientProgram(patientProgramId, enrollmentDateYmd,
> > completionDateYmd, null);
> >     }
> >
> > On Fri, Aug 5, 2011 at 1:11 AM, Greg Warren <[email protected]>
> > wrote:
> >>
> >> Hi, I'm working on TRUNK-2329 and have several issues when clicking on
> the
> >> link to edit a patient program.  I have latest trunk code.
> >>
> >> 1)  I get "A javascript error has occurred: dateToFormat.getDate is not
> a
> >> function" when the popup opens. I think this is because there are two
> >> formatDate methods:
> >>
> >>   patientPrograms.jsp: function formatDate(ymd)
> >>   patientGraphs.jsp function formatDate(dateToFormat)
> >>
> >> It seems the wrong one from patientGraphs is being called.  Renaming one
> >> of them seems to fix that problem.
> >>
> >> 2)  The save button does save, but the callback method does not seem to
> be
> >> running so the popup does not close and the page does not refresh.  I
> think
> >> the delete callback was broken too.
> >>
> >> 3)  Maybe this is related to #2, but when saving the locationId is
> always
> >> null.  The javascript variable locationId is set to a string value, but
> the
> >> locationId parameter in DWRProgramWorkflowService.updatePatientProgram
> >> method is always null.
> >>
> >> Can anyone else reproduce these issues?
> >
> > ________________________________
> > Click here to unsubscribe from OpenMRS Developers' mailing list
>
> _________________________________________
>
> To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to
> [email protected] with "SIGNOFF openmrs-devel-l" in the  body
> (not the subject) of your e-mail.
>
> [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]
>

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to