Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-1068

Possible bug when using anyPrivilege in openmrs:require tag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 1.6.0
    • Component/s: None
    • Labels:

      Description

      Recently I needed to use the anyPrivilege parameter of the
      openmrs:require tag and I got this error:

      An Internal Error has Occurred
      org.apache.jasper.JasperException
      
      /WEB-INF/view/module/visitscheduler/index.jsp(15,0) Unable to find setter method for attribute: anyPrivilege
      

      Looking at src/web/org/openmrs/web/taglib/RequireTag.java (1.5.x branch), I found that the getter/setter functions for the anyPrivilege field are named getAnyPrivileges and setAnyPrivileges (note the "s" at the end of the names).

      Just in case, I renamed them to getAnyPrivilege/setAnyPrivilege, recompiled, redeployed and the error message was gone.

      Looking at the code at trunk, I noticed that these functions have the same name and I suspect that this problem may appear in 1.6 too.

      I've attached a patch agaisnt 1.5.x.

        Attachments

          Activity

            People

            Assignee:
            rarcos Ricardo Arcos [X] (Inactive)
            Reporter:
            rarcos Ricardo Arcos [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: