Creating New Paths

For the most part, a renderer plug-in just resolves the values of the paths given to it in the Binding of its Field object. However, in some cases, the renderer requires data other than that referenced by the given paths. For example, a renderer may require a localized text value to use as a label within the HTML that it produces. In this case, the renderer must create a new path that references the required data and then resolve it to the required value.

New paths are created by extending one of the supported prefix paths. These prefix paths are defined by the ClientPaths class in the curam.util.client.path.util package. Each prefix refers to a different type of data source. Only a limited set of data sources for use in custom renderers are supported in the application. The supported prefix paths for those data sources are defined by these constants on the ClientPaths class:

GENERAL_RESOURCES_PATH
A reference to a localized text property within a Java properties file available on the classpath.
APP_PROP_RESOURCE_PATH
A reference to a localized text property within a Java properties file stored in the Application Resource Store in the database.
LITERAL_VALUE_PATH
A path encoding a literal value that can be resolved without reference to any external data source.

The prefix path is extended with further path steps to identify the required data. The forms of the paths required for each of the supported data sources are described in the following sections. The use of constants in ClientPaths, or their corresponding prefix path values, other than those listed above, are not supported in the Cúram application.