template_banner.gif Main Index  PREV  NEXT

Valid HTML 4.01!   Valid CSS!

Tab Forms

Overview

A Tab form is actually a group of forms - a Tab Parent that contains the tab widget, and a series of child forms (known as Tab Pages). One of the tab pages will be defined as the initial selection, and will be displayed when the parent form is activated. The other tab pages will only become visible when the relevant tab is selected. Only one tab page can be visible at a time.

The whole of each child form will appear inside the area of the tab widget defined in the parent, therefore the dimensions of each child form should not exceed those of the tab widget in the parent. If they do, this will cause scroll bars to become visible inside the tab widget.

Tab Pages (the child forms) do not usually have any action buttons of their own - they follow any action taken in the parent form.

Tab labels

The number of tabs that appears on the tab widget is defined in a valrep list that has the following format:-

component1=label1;component2=label2;...;componentN=labelN

where ';' is the standard GOLD-semicolon separator in associative lists.

This list can be obtained from the message file so that different labels can be shown for different languages.

When the tab parent is initiated it will first examine the contents of this valrep list and remove any entries where the user has not been granted access to the component. By removing the entry from the valrep list the label will not appear on any tab, and so the component cannot be selected. If the user has not been granted access to any of the tab pages then the tab widget will be empty and there will be no tabs to select.

Data for Tab Pages

The Tab Parent and its child Tab Pages are considered to be a single logical unit. All database access is performed within the parent and only passed to the child when it is first activated. If updates are allowed then any changes made in a child form will be passed back to the parent so that the store/commit can be performed within the parent.

Each child form is activated using the global proc LAUNCH_TAB_PAGE. The action that this takes depends on whether an instance of the child component already exists:-


Tab Read Parent

CT_TAB_READ.gif

Description

For an overview of all Tab forms please go here.

This type of form will be used to display the contents of an object. Only one occurrence of that object can be displayed with each operation of this form.

Upon initial entry there will be an automatic retrieve of the relevant occurrence using the primary key value passed down from the parent form. Data will then be passed down to a series of child forms that will become visible when the relevant tab is selected on the tab widget.

In this example no fields are shown on the MAIN entity other than the tab widget itself. In any physical implementation it is possible for both the tab parent and its children to contain fields.

All child Tab Pages for this component should be constructed from the Tab Read Child template.

Buttons

CLOSE Exit and return to the parent form.

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
ACTION_BAR CLOSE ACTION_BAR CLOSE
MAIN TAB_FIELD    

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.
CUSTOM_RETRIEVE Y or N If this is set to "Y" then the <EXEC> trigger will call local proc LP_CUSTOM_RETR in order to retrieve the initial data instead of using the generic code. LP_CUSTOM_RETR can be customised as required.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  
PARAMS  

Tab Read Child

CT_TAB_CHILD.gif

Description

For an overview of all Tab forms please go here.

This type of form can only be called from a Tab Read Parent. Data to be displayed is passed down from the parent when the form is activated.

Buttons

N/A

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
MAIN      

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  

Tab Write Parent

CT_TAB_WRITE.gif

Description

For an overview of all Tab forms please go here.

This type of form will be used to display the contents of an object and allow changes to be made. Only one occurrence of that object can be displayed with each operation of this form.

Upon initial entry there will be an automatic retrieve of the relevant occurrence using the primary key value passed down from the parent form. Data will then be passed down to a series of child forms that will become visible when the relevant tab is selected on the tab widget.

In this example no fields are shown on the MAIN entity other than the tab widget itself. In any physical implementation it is possible for both the tab parent and its children to contain fields.

All child Tab Pages for this component should be constructed from the Tab Write Child template. This contains a PASS_BACK_VALUES operation which is activated by the parent before the database is updated so that all changed data from the child forms is brought back into the parent. This means that the store/commit can be performed in a single place (the parent) rather than being repeated within each child.

Buttons

STORE Will commit all pending updates to the database, but will remain within this function.
OK Will commit all pending updates to the database and return to the parent form.
CANCEL Will abandon all outstanding updates and return to the parent form.

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
ACTION_BAR CANCEL ACTION_BAR CANCEL
  OK   OK
  STORE   STORE
MAIN TAB_FIELD    

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.
CUSTOM_RETRIEVE Y or N If this is set to "Y" then the <EXEC> trigger will call local proc LP_CUSTOM_RETR in order to retrieve the initial data instead of using the generic code. LP_CUSTOM_RETR can be customised as required.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  
PARAMS  
FORMFOCUS Used when processing the <QUIT> trigger.

Tab Write Child

CT_TAB_CHILD.gif

Description

For an overview of all Tab forms please go here.

This type of form can only be called from a Tab Write Parent. Data to be displayed is passed down from the parent when the form is activated. If a database update is required all changed data is passed back to the parent via the PASS_BACK_VALUES operation so that the store/commit can be performed within the parent.

Buttons

N/A

Contents

Bound Objects

Source Entity Source Field Target Entity Target Field
MAIN      

Local Constants (Refer to Local Constants)

Name Expression Description
FORM_VERSION 01.000.000 To be incremented each time the component is changed.

Component Variables (Refer to Component Variables)

Name Description
FORM_VERSION  

copyright.gif http://www.tonymarston.net