Management Center definitions
The Management Center framework uses configuration information that is called definitions to display all of the features available in Management Center, such as tools, business objects, properties views, and list views. Definitions are stored in definition (.def) files that are in the LOBTools/WebContent/config directory.
A definition file is an XML file that contains a root element named Definitions. Each child element of the Definitions element is a definition. These child definition elements can include definitions for tools, business objects, properties views, and list views. Each definition element must include the definitionName attribute to specify the name of the definition. The name of the definition element is the name of the class that is instantiated when the definition is loaded. By default, this class name is qualified by the three character prefix, wcf. You can override this name by specifying a package name that uses the package attribute. If a definition extends another definition, the name of the base definition is specified by using the baseDefinition attribute. All other attributes are passed to the new instance of the definition when the definition is instantiated.
parentDefinitionName
attribute set to be the
name of the definition that is being extended. The extension definitions
can be deploying within one or more definition files. When the original
definition is instantiated by the framework, all of the extension
definitions are instantiated as a child of the new definition instance.
The following code snippet identifies a widget object definition that
extends the plmBasePageLayoutPrimaryObjectDefinition
definition:<Definitions>
<WidgetObjectDefinition package="plm"
definitionName="plmLayoutWidget_ShoppingCartDetailPageWidget"
parentDefinitionName="plmBasePageLayoutPrimaryObjectDefinition"
baseDefinitionName="plmBaseLayoutWidget"
...
</WidgetObjectDefinition>;
</Definitions>
The descendant elements of each definition element are constructed after the definition instance is created. The names of these descendant elements are the names of the classes that are instantiated when the child elements are constructed. By default, the name of this package is wcf. You can override this name by specifying a package name that uses the package attribute. By specifying the baseDefinition attribute, the attributes and each child of a child definition element are inherited from another definition. Do not specify the definitionName attribute for descendant elements. Specify the definitionName attribute for child elements of the Definitions root element only.
"${resourceBundle.key}"
Where:- resourceBundle
- The ID of the resource bundle instance.
- key
- The name of the resource bundle key.
<Definitions>
1 <PrimaryObjectDefinition
baseDefinitionName="catBaseCatalogPrimaryObjectDefinition" definitionName="Catalog" objectType="Catalog"/>
2 <PrimaryObjectDefinition
baseDefinitionName="catBaseCatalogPrimaryObjectDefinition" definitionName="InheritedCatalog"
displayName="${catalogResources.inheritedCatalog_DisplayName}" headerIcon="inheritedCatalogHeaderIcon"
icon="inheritedCatalogIcon" objectType="InheritedCatalog">
<ParentReferenceObjectDefinition
baseDefinitionName="catChildInheritedCatalogGroup"/>
</PrimaryObjectDefinition>
</Definitions>
- 1 Catalog
- 2 InheritedCatalog
- Create the class instance of the parent definition element before you create the child definition elements.
- If you need to perform more initialization in the parent definition after you create each of the child definition elements, declare the postCreateDefinitionChildren method in the parent class. This method is called after each of the child elements are created.
- If the initstage attribute in the class is set to defer, the child elements are not automatically created and you must call wcfDefinitionLoader.completeCreateDefinitionChildren(this); from the completeInstantiation method of the class that deferred the initialization.
<attribute name="width__type" type="string" value="number"/>
Valid
values for these type declarations are string
, number
,
and boolean
. If the type is not declared, it is assumed
to be string.If you add or change definition files in the LOBTools/WebContent/config directory, you do not need to restart your WebSphere Commerce Server; the new definitions are automatically detected. You must restart Management Center after you close the Management Center browser window and ensuring that the browser cache is cleared.