Do Check for Nulls

Renderer plug-ins may be supplied with null values, so check for null values to avoid errors. The main values that may be null are the paths of the field's binding, the field's parameters and the values resolved using paths.

The CDEJ will never supply null arguments to the render method, but if one renderer invokes another, this cannot be guaranteed. In a view-renderer, the field's source path will never be null, but the target path will always be null; these do not need to be checked if this is assumed. In an edit-renderer, the field's target path will never be null, but the source path may or may not be null and should always be checked.

The field's parameters may or may not be null. Typically, the parameters reflect the attributes used in the UIM. However, if an attribute was set to the same value as its default value, or was not set at all, then the parameter value is likely to be null. Always check parameter values for null and, if they are null, ensure that the renderer treats this the same as the default value for the corresponding UIM attribute. The default values for the attributes are described in the Cúram Web Client Reference Manual.

On resolving paths using the DataAccessor, the values may be null in some cases. A path to a server interface property will not resolve to null, the DataAccessor will throw an exception instead. Paths to values within an XML document that are resolved using a SimpleXPathMarshal may result in a null value. See Extending Paths for XML Data Access for details on the conditions that can result in null values.