Smart Client Derived Forms – Best Practices
About Derived Form
A derived form can visually inherit from a base form, or define the layout itself. Externalized resources are inherited from the base form. The application code file is a subclass of the base application code file. The form metadata (.uiff file) describes the changes to the base form it derived from.
Use Derived Form for
Any customization that extends or overrides existing layout, any customization that extends or overrides existing functionality, or any customization that need to implement several forms that share common layout or functionality, yet differ in certain aspects.
Derived Form XML – .uiff
Boolean attributes for elements used in processing derived forms:
Applies to all UI elements.
It is set when an element is inherited from a base element.
Applies to removable collection elements such as
- Data Model Rows in a Tabular Data Model
- Property Bindings
- Trigger Fields
- Request/Response Map Items
- Data Comm Items
- Bulk and Sequence Actions
It is set when a collection element is removed from a base collection.
Applies to ordered collection elements such as Grid Columns, Tree Node Templates, Tab Pages, Menus, Bulk and Sequence Actions.
It is set if an ordered collection is re-ordered in the derived form.
Breaking the Layout
Breaking the layout may result of any of the following activities:
- Add or remove a row or column from a base panel’s layout
- Move a base control
- Change spanning of a base control
- Drop a new control into an empty cell in a base panel’s layout
The user is notified when an action force the layout to be broken
Removing Base Control
Attempting to delete a control defined in a Base form panel or tab page moves it automatically to the unused controls parking lot.
The following collection elements defined in a Base form cannot be removed from their parent collection in a derived form:
- Card (panel) in a Card Pane
- Grid Column
- VoFieldDef for a manual data model
- Field Value pair for initializing a singular data model
- Data Model / Tabular data model
- Action Element
- Data Comm Element
- Single Select Group
- Tree Node Template
When Deleting a Base Form Control
If a derived form made the same deletion the deleted element is flagged as “uifremoved”, an informational message is posted in the problems view and upon save, the derived form no longer reference the deleted element.
If a derived form made updates to the same element, a warning is placed in the problems tab.
Keeping Visual Inheritance
To keep visual inheritance of an existing base form, add a panel container to a base card pane, add all new controls there. Add a tab panel to a base tabbed pane, add all new controls there.
Plan for Visual Inheritance
When creating new form, add one or more panels or card panes and associated panels to cover all root panel areas. Layout your new form with an area for the base form specifically using a card panel or tabbed pane for customization or derived forms to add functionality.