Skip to main content

Application Model: Built-in Node Generators

  • 5 minutes to read

Internally, XAF modules use approaches described in the Extend and Customize the Application Model in Code topic to generate the Application Model content. This topic provides a list of built-in Node Generators. You can use this list when customizing the application model by implementing a Generator Updater. Here, you can find out what Node Generators are available for customization.

Node Generators in the System Module

Node Generator

Target Model Interface

Description

ImageSourceNodesGenerator

IModelImageSources

Generates the following child nodes of the ImageSources node:

ModelActionContainersGenerator

IModelActionToContainerMapping

Generates child nodes of the ActionDesign | ActionToContainerMapping node. Collects IModelAction.Category values specified for ActionDesign | Actions nodes and generates IModelActionContainer node for each category found. Each ActionContainer node contains IModelActionLink nodes specifying Actions linked to the Action Container.

ModelActionsNodesGenerator

IModelActions

Generates child nodes of the ActionDesign | Actions node. Collects Controllers from the Controllers node, and gets their owned Actions via the Controller.Actions property. Adds IModelAction nodes that represent found actions. An IModelChoiceActionItems child node is additionally created for ChoiceActionBase Actions,

ModelBOModelClassNodesGenerator

IModelBOModel

Generates child nodes of the BOModel node. Adds an IModelClass node for each business class. Initializes these Class node’s properties: IModelClass.Caption, IModelClass.DefaultListView, IModelClass.DefaultLookupListView, IModelClass.DefaultDetailView, and properties whose values are specified in code via the CustomAttribute.

ModelBOModelMemberNodesGenerator

IModelBOModelClassMembers

Generates child nodes of BOModel | OwnMembers nodes. Gets a public members list from the business class’ metadata information. Initializes the IModelMember nodes’ properties with values specified in code via Data Annotations in Data Model applied to business class members, e.g CustomAttribute, IndexAttribute, LookupEditorModeAttribute, ImagesForBoolValuesAttribute, CaptionsForBoolValuesAttribute, ImageEditorAttribute, DataSourcePropertyAttribute, etc.

ModelChoiceActionItemsNodesGenerator

IModelChoiceActionItems

Generates child nodes of the ActionDesign | Actions | <Action> | ChoiceActionItems nodes. Adds IModelChoiceActionItem nodes that represent items of the Choice Action.

ModelControllerActionsNodesGenerator

IModelControllerActions

Generates child nodes of the ActionDesign | Controllers | Controller | Actions nodes. Collects Actions of the current Controller from the IModelActions node.

ModelControllersNodesGenerator

IModelControllers

Generates child nodes of the ActionDesign | Controllers node. Adds an IModelViewController, IModelWindowController or IModelController node for each registered Controller, depending on the Controller type. Adds the IModelControllerActions child node for Controllers exposing a non-empty Controller.Actions Actions list.

ModelCreatableItemsGenerator

IModelCreatableItems

Generates child nodes of the CreatableItems node. Adds an IModelCreatableItem node for each business class having the IModelClass.IsCreatableItem property set to True.

ModelDetailViewItemsNodesGenerator

IModelViewItems

Generates child nodes of the Views | View | Items node. If the parent View node is IModelObjectView, adds IModelPropertyEditor nodes for members of the current object that should be visible. Separate PropertyEditor nodes are generated for aggregated objects’ members, if this option is enabled via the ExpandObjectMembersAttribute attribute. An example of implementing a Generator Updater for this Node Generator is provided in the How to: Implement a View Item topic.

ModelDetailViewLayoutNodesGenerator

IModelViewLayout

Generates child nodes of the Views | View | Layout node. Creates the layout structure of the current View. The rules of generating a default layout are described in the View Items Layout Customization topic. An example of implementing a Generator Updater for this Node Generator is provided in the How to: Implement a View Item topic.

ModelListViewColumnsNodesGenerator

IModelColumns

Generates child nodes of the Views | <ListView> | Columns node. Adds IModelColumn nodes that represent columns of the current List View. The rules for generating the default column set are described in the List View Column Generation topic.

ModelListViewFiltersGenerator

IModelListViewFilters

Generates child nodes of the View | ListView | Filters node. Collects filters specified for the current List View’s business class via the ListViewFilterAttribute attributes. Creates the IModelListViewFilterItem for each filter. An example of implementing a Generator Updater for this Node Generator is provided in the Filters Application Model Node topic.

ModelLocalizationGroupGenerator

IModelLocalizationGroup

Generates child nodes of the Localization | LocalizationGroup node. Adds IModelLocalizationItem and nested IModelLocalizationGroup nodes of the current localization group based on registered IXafResourceLocalizer objects.

ModelLocalizationNodesGenerator

IModelLocalization

Generates first-level child nodes (IModelLocalizationItem nodes) of the Localization node, based on registered IXafResourceLocalizer objects. The example of implementing a Generator Updater for this Node Generator is provided in the EnumDescriptor.GenerateDefaultCaptions topic.

ModelOptionsNodesGenerator

IModelOptions

This is an empty generator that does nothing. However, as it is attached to the Options node, you can implement a Generator Updater for this Generator, and customize the Options node.

ModelRegisteredViewItemsGenerator

IModelRegisteredViewItems

Generates child nodes of the ViewItems node. Adds IModelRegisteredViewItems and IModelRegisteredPropertyEditors nodes, based on registered Property Editors.

ModelViewsNodesGenerator

IModelViews

Generates child nodes of the Views node. Adds an IModelDetailView and two IModelListView nodes for each class defined in the IModelBOModel node. One of the generated ListView nodes defines a general-purpose List View, and another - a Lookup List View. An example of implementing Generator Updaters for this Node Generator is provided in the How to: Create Additional ListView Nodes in Code using a Generator Updater topic.

NavigationItemNodeGenerator

IModelRootNavigationItems

Generates child nodes of the NavigationItems node. Adds IModelNavigationItem nodes for business classes that have the IModelClassNavigation.IsNavigationItem property set to true in the corresponding BOModel | <Class> node.

TemplatesModelNodeGenerator

IModelTemplates

This is an empty generator that does nothing. However, as it is attached to the Templates node, you can implement a Generator Updater for this Generator, and customize the Templates node.

Node Generators in Extra Modules

Node Generator Module Target Model Interface Description
AppearanceRulesModelNodesGenerator Conditional Appearance IModelAppearanceRules Generates child nodes of a BOModel | <Class> | AppearanceRules node. Collects AppearanceAttribute attributes applied in a business class code and adds corresponding IModelAppearanceRule nodes.
FileTypeFiltersNodesGenerator File Attachments (Windows Forms) IModelFileTypeFilters Generates child nodes of a BOModel | <Class> | FileTypeFilters node. Collects FileTypeFilterAttribute attributes applied in the code of business classes, and adds corresponding IModelFileTypeFilter nodes.
ModelValidationContextsNodeGenerator Validation IModelValidationContexts Generates child nodes of the Validation | Contexts node. Uses IRuleBaseProperties.TargetContextIDs values from the Validation | Rules | Rule nodes to collect Validation Contexts. Adds an IModelValidationContext node for each Context.
ModelValidationRulesNodeGenerator Validation IModelValidationRules Generates child nodes of the Validation | Rules node. Collects Validation Rules specified in code and adds corresponding IModelRuleBase nodes.