Upgrading from 1.7 of the UI Framework

The UI Framework module had some necessary but non-backwards compatible changes introduced in version 1.8. If you are currently using version 1.7 then you will need to update your code as described here:

  • UiUtils.resourceLinkpageLinkactionLinkincludeFragmentdecoratedecorateWith methods all now require the view provider, e.g.
    • ui.pageLink("home") becomes ui.pageLink("mymodule", "home")
    • ui.resourceLink("image.jpg") becomes ui.resourceLink("mymodule", "image.jpg")
  • UiUtils.pageLink returns URLs in new format which includes the view provider instead of "/pages/", e.g.
    • Old format 1: /openmrs/pages/hello.page
    • Old format 2: /openmrs/pages/mymodule/hello.page
    • New format: /openmrs/mymodule/hello.page
  • UiUtils.actionLink returns URLs in new format which includes the view provider instead of "/action/", e.g.** Old format 1: /openmrs/action/controller/hello.action?
    • Old format 2: /openmrs/action/mymodule/controller/hello.action?
    • New format: /openmrs/mymodule/controller/hello.action?

If you are using the UI Library module then you should upgrade it to the latest release and make the following changes:

  • All calls to UiUtils in the UI Framework now use the view provider name
  • All page and action URLs use the new format
  • All Javascript equivalents of UiUtils methods defined in ui.js use the view provider name
  • Removed Javascript methods from older uiframework.js that re-occur in newer ui.js, e.g.** pageLink('home') becomes ui.pageLink('mymodule', 'home')