Custom editor is a useful feature in MX-Developer which provides a capability for the developer to completely customize the look and feel of a user interface. Developer can define exactly which data is visible and where this data is located on user interface. The whole UI can also be equipped with meta data such as title, description, icon, etc. This is done by specifying meta data of the data source. Editor can execute desirable writable or readable extended statement as well as default statements.
Custom editor is invoked through a workflow execution. This means that any kind of operation can be executed before and after editing is complete.
Custom editor properties which define the data to be edited are:
Property | Description |
---|---|
ExtendedStatement | Defines extended statement which will be executed on edit conformation if UpdateMode property is set to ExtendedStatement. List contains all extended statements defined in data source which is selected in Schema property. |
Schema | Defines data source from which the schema for the editing will be used. List contains all data sources created in adapter defined in property SchemaType. |
SchemaType | Defines the adapter from which it is possible to select a data source. List contains all MxAdapters created in current solution. |
UpdateMode | Defines the behaviour of the editor upon edit conformation. If Default value is selected update procedure will be executed. If ExtendedStatement value is selected, extended statement defined in property ExtendedStatement is executed. |
Example (MxSpace)
To see the implementation of a Custom editor in MxSpace application click Production -> Manage. Click End Date in context navigation. An editor opens where you can set work order end date and it is automatically inserted in the grid.
To implement a custom editor
- Create new project item. Right Click project node in Solution Explorer and select Add -> New Item (WorkOrerEndDateComplexEditor).
- From My Templates list select MxComplexEditor.
- Define editor’s properties in section Data appropriately.
- Right click on the editor control and select Bind Schema.
- Arrange individual fields by your preferences.
- Open the data source where created custom editor will be used and select Custom Editors node.
- Click Add and select Custom Editor.
- Select the new editor and enter the name of the editor in property Name.
- Select previously created complex editor from the list in property EditorType.
- Create a work flow (WorkOrderEndDateDiagram) and add Editor activity in order to invoke editor.
- Create a work flow menu in context navigation of a part (WorkOrderManagePart) to display the editor.
MxAdapter
Editors