Not all Forms object properties are created equal; some properties are read-only,
for example. There are some support methods in JDAPI for inspecting properties.
The class JdapiMetaProperty
represents the metadata for a given
property, obtained from a given JdapiMetaObject
which is in turn
obtained from a given Forms object. See the generic coding example
in Writing Generic Code Using Metadata
to see how this works in practice. JdapiMetaProperty
also has some
static utility methods for inspecting any property (usually by constant value).
These methods allow you to obtain, for example, the name of the property, its
allowed values, its type, or whether it can be set or only read.
An additional convenience method is found in the class PropertyMap
,
which allows you to retrieve the list (as a Class[]
) of Forms object
class types which can be returned from a given property of a given object type:
Class [] classes = PropertyMap.getPropertyTypes("Block", JdapiTypes.MODULE_PTID);
This fragment will return an array containing the classes FormModule
,
and ObjectLibrary
. This feature can be useful for using the intrinsic
Forms metadata to dynamically build a framework for your application.