/
How to Use the Settings Portlet

How to Use the Settings Portlet

Settings (formerly Global Properties from 1.9 downwards) allow users to configure the OpenMRS system's behavior. Some are provided by the OpenMRS core (see examples), and others by modules.

The Settings (formerly Global Properties from 1.9 downwards) portlet lets you easily display the values of a subset of Settings (formerly Global Properties from 1.9 downwards), and edit them via ajax. This is especially useful if you want your module to have a configuration page, but you don't want to do a lot of work.

The portlet supports the following parameters:

  • 'propertyPrefix' will limit to only global properties starting with that prefix (e.g. "formimportexport.")

  • 'excludePrefix' will exclude global properties starting with that prefix (e.g. "formimportexport.started")

  • 'hidePrefix' a boolean decides whether or not to trim the prefix on what is displayed (i.e. "formentry.infopath_url" -> "infopath_url") (default false)

  • 'title' will display that title

  • 'showHeader' whether or not to show a header row in the table (default true)

  • 'readOnly' a boolean decides how global properties appear, if it has set readOnly to true the properties will be displayed non editable, if it is not readOnly there is an additional check to verify whether the user has privileges to manage global properties.If user is having the privileges the global properties are displayed editable otherwise readonly.

Example usage of the Settings (formerly Global Properties from 1.9 downwards) portlet (extracted from formimportexport module)

<openmrs:portlet url="globalProperties" parameters="title=${title}|propertyPrefix=formimportexport.|excludePrefix=formimportexport.started|hidePrefix=true|readOnly=false"/>

Settings (Formerly Global Properties From 1.9 Downwards) in editable manner

Global Properties in readonly manner

Related content

Setting and Reading Global Properties
Setting and Reading Global Properties
More like this
Settings Descriptions
Settings Descriptions
More like this
Module Global Property Listeners
Module Global Property Listeners
More like this
openmrs-esm-module-config
openmrs-esm-module-config
More like this
Settings Editor Module
Settings Editor Module
More like this
Overriding OpenMRS Default Runtime Properties
Overriding OpenMRS Default Runtime Properties
More like this