AX 2012: Tab control

A tab control is a container control designed to hold separate tab pages, and is a way of grouping a large number of fields on a form so that not all of the controls are visible at any one time, but can be accessed quickly by the user.

Introduction

Prior to Ax 2012, only one style of tab control was available. This displayed the contained tab pages in a traditional horizontal format, with the tabs for accessing each tab page arranged across the top of the tab control.
From Ax 2012 onwards, different styles of tabs became available. These are designed for use in different situations, and the use of each style is dictated by best practice guidelines depending on the form design pattern used.

Tab styles

The following tab styles are available in Dynamics Ax 2012 onwards.
Tabs
This is the traditional horizontal format available in previous versions.
Fast tabs
These are arranged vertically, with collapsible sections. The user can elect to expand as few or as many of the sections at one time as desired, and this decision will be persisted so that next time the form is opened the layout will be identical.
An example of Fast tabs in use from the standard Customer form is shown below. Three tab pages are shown; Payment defaults, Financial dimensions and Invoice and delivery.
FastTabs.jpg
Summary fields
Fast tabs support the use of summary fields, which are a set of horizontally arranged data controls, visible even when the tab page is collapsed, giving a summary of the data presented on the tab. In the screenshot above, summary fields are shown for the Payment defaults and Invoice and delivery tab pages, as highlighted on the right-hand side of the screenshot.
The selection of which controls to display in the summary section is made by the application itself. The system examines each control on the tab page in turn, in the order specified in the form design, and decides whether or not that control qualifies as a summary field.
Each control is either included or excluded, until a maximum of five summary fields are identified or all controls on the tab page have been evaluated. This information is then shown without labels next to the fast tab page caption. It is important the data is self-explanatory.
The criteria used to evaluate each control is as follows:
  • All data form controls are considered for inclusion, except check boxes.
  • Unbound controls are never included.
  • Controls bound to local display methods (at form or datasource level) are never included.
  • Table-bound display methods are also never included, despite it being possible to include them in the AutoSummary field group on the table.
  • If the control is bound to a table field and is not a referenceGroup control, then the following rules apply:
    • if the FastTabSummary property is set to Yes, then it will be included.
    • if the FastTabSummary property set to Auto, then it will be included only if it is in the AutoSummary field group on the underlying datasource table.
    • if the FastTabSummary property is set to No, then it will not be included, even if it is in the AutoSummary field group.
  • If a control is a reference group control, then the individual sub-controls (segments) of the reference group are individually examined. Each will be included in the summary controls if it exists in the AutoSummary field group of the related table.
It is not always possible, on a particular form, to exactly specify which fields will be shown. Specifically, reference group controls will be included based on the contents of the AutoSummary field group on the related table, with no way to override that on the local form.
Vertical tabs
These are used in the Table of Contents form style.
Index tabs
These are similar to the traditional, older-style tabs, except that the tabs themselves are arranged horizontally across the bottom of the control.
Using tabs in X++
Best practice is to override the pageActivated() method on a tab page if code needs to be run when a user selects a specific tab page.
Imparted from here















No comments:

Post a Comment