Académique Documents
Professionnel Documents
Culture Documents
Training Guide
Product
Information
Version 6.0
2003 Meta4 Spain, S.A. All rights reserved.
WARNING: This manual is protected by copyright law and international treaties. Permitted use of this
document is limited to its use in connection with the product and any unauthorized use will be pursued to
the full extent of the law. Do not copy, modify, reproduce or distribute without the owner's permission.
Meta4 PeopleNet 1999. Meta4 Spain, S.A. All rights reserved.
Meta4KnowNet 1996. Meta4 Spain, S.A. All rights reserved.
Meta
, Meta4Mind
, Meta4 PeopleNet
, Meta4 KnowNet
are registered
trademarks belonging to Meta4 Spain, S.A.
Other company names, products, or services are registered trademarks or trademarks of their respective
owners.
Meta4Spain, S.A.
Centro Europa Empresarial
Edificio Roma
C/ Rozabella, 8
Ctra. de La Corua, km. 24,200
28230 Las Rozas, Madrid
SPAIN
http://www.meta4.com
Publishing Date: 2nd January, 2003.
Last Modified Date: 2nd January, 2003.
i
Table of Contents
INTRODUCTION 1
n Course objectives 1
n Prerequisites 2
n How to use the training guide 3
Using the guide during the course 3
Using the guide after the course 4
n Designing presentations in the development cycle 5
n About this course 7
OVERVIEW 9
n Overview objectives 9
n Main Concepts 10
1 INTRODUCING THE FRONTEND DESIGNER: BASIC CONCEPTS 13
n Introduction 13
How to access the functionality for this lesson 14
n Conceptual definitions 16
ii
Contents
Frontend Designer window structure 16
New Presentation 17
Previewing a presentation 18
Central pane: Visual Designer 18
Inserting a new form in a presentation 18
Shifting from Form1 to Form2 19
Changing the grid size 20
Central pane: OBL editor 20
Editing the OBL code of a presentation 20
Closing the OBL editor 21
Control palette 23
Adding controls from the control palette to a form 23
Saving a presentation 25
Adding controls to a form from the "Insert Component" option 25
First approximation to basic properties of visual components 27
Setting properties in design time using the Properties dialog box 27
Control Label 30
Control Image 31
Control Link 32
Control Urlbox 32
Control Combobox 32
Control Checkbox 33
Control Groupbox 33
Control Checkboxgroup 34
Control Textbox 34
Control Button 34
Control Slider 35
Setting properties in design time using the OBL editor 35
The syntax checker 36
Saving code from the FrontEnd Designer and inserting code into the OBL editor 38
Saving OBL code from the FrontEnd Designer 38
Inserting code into the OBL editor 39
Presentation Explorer 40
Adding visual and non visual components with the explorer. Events and Actions. 40
Components as containers 42
Nodes and their hierarchical interpretation 43
Introducing OBL 44
What is behind a running presentation? 45
iii
Contents
The Properties dialog box and the programming scenario 47
Overview 47
Case 1 47
Examples for case 1 49
Case 2 52
Examples for case 2 52
Example 53
General hints 54
Some exceptions 55
Control Split 57
Toolbars 57
Menus 58
n Review questions 60
n Lesson summary 61
Lesson Key Points... 61
You should be able to .... 61
2 BUILDING LOGIC INTO PRESENTATIONS: MORE OBL 63
n Introduction 63
How to access the functionality for this lesson 64
n Conceptual definitions 66
Hierarchy means logic 66
Referring to properties of other objects 66
Absolute referencing 66
Relative referencing 67
Absolute reference facility 68
Changing properties in runtime 72
Action_set 72
Action_call - Methods 73
Namespace 74
Connecting presentations 74
Connecting through an Extends component 74
Connecting through an Action_task 74
Presentation context and context variables 75
Transferring variables - Context vs. Runtime variables 77
iv
Contents
n Review questions 79
n Lesson summary 80
Lesson key points... 80
You should be able to... 80
3 ADVANCED CONTROLS AND FUNCTIONALITY 81
n Introduction 81
How to access the functionality for this lesson 82
n Conceptual definitions 84
Tabstrip, Panel and Scrollpanel 84
Changers and trees. Virtual forms. 85
Changers 85
Exercise 86
Trees 87
Exercise 87
Virtual Areas 87
Multi language text 89
Some important properties 90
Implicit Flow control; Explicit Flow control (Action_goto) 91
Action_dialog 94
Exeblocks 94
n Review questions 96
n Lesson summary 97
Lesson key points... 97
You should be able to... 97
4 CONNECTING TO META4OBJECTS 99
n Introduction 99
How to access the functionality for this lesson 100
n Conceptual definitions 102
v
Linking components to Meta4Objects 102
Data properties 102
Loading options 103
Controls closely related to Meta4Objects 105
Text property. Multi language options. Hard coded text vs. data bound text. 109
Toolbar navigation buttons. First approach. 110
Multinode Meta4Objects. 111
Introducing the Record Insert Wizard 112
Action_value 116
Action_list 117
Patternbox 118
Nodestatus 118
Table 119
Further steps on data related Actions and Toolbarbuttons 121
Toolbar groups 122
Advanced data related Actions - Use of Action_call - Action_dataprops 123
Action_method 125
Action_bp 127
Using Split controls 128
Mimic control 128
5.2.17 Back to changers 130
Action_script, Checkbox and Checkboxgroup 131
Action_script 131
Checkbox control 132
Listgroup 134
Structure of the Listgroup control - The Function control 137
General properties of Listgroup 139
Function properties 140
Passing data Part I - Mainargs and Mainobjs 140
Passing data Part II - Targetitems and Targetobjs 142
Function Zoom 144
Function Clear 144
Function List 145
Label 146
Textbox (non virtual fields) 147
Textbox (virtual fields) 147
List button 148
Advanced properties of the ZLG 148
The Record Insert Wizard and the ZLG 151
Working with tracks 154
Toolbar Navigation Groups 158
Specific patterns 159
Steps in the preload 161
vi
Conditional object construction 163
Multicompany features in presentations 165
Default and customized presentations 165
Customized presentations - params group type element for toolbar 167
Customized presentations - button type element for toolbar 168
n Review questions 169
n Lesson summary 170
Lesson key points... 170
You should be able to... 170
5 EXPLORING WHAT THE FRONTEND DESIGNER WIZARD DOES 171
n Introduction 171
How to access the functionality for this lesson 172
n Conceptual definitions 174
Main structure 174
SplNodeFields_Up 174
SplNode_Up 177
SplNodeFields_Down 178
Logic in Default Presentations 179
The Tree as a main controller 179
Tabs 180
Footer section (SplNodeFields_Down) 180
Multicompany in default presentations 181
n Lesson summary 182
Lesson key points... 182
You should be able to... 182
A APPENDIX: BRIEF SUMMARY OF SOME CONTROLS 183
n About this appendix 183
n Controls for containers 184
vii
B APPENDIX: MOUSE EVENTS 189
n About this appendix 189
n Mouse events 190
C APPENDIX: EVVALIDATE: TRIGGERING MECHANISMS 191
n About this appendix 191
n Evvalidate 192
Triggered when losing focus 192
Triggered when clicking 192
D APPENDIX: DATA-RELATED EVENTS 193
n About this appendix 193
n Data-related events 194
E APPENDIX V: OTHER EVENTS 195
n About this appendix 195
n Other events 196
F APPENDIX VI: SOME PROPERTIES 197
n About this appendix 197
viii
n Properties 198
Properties set #1 198
Properties set #2 199
Properties set #3 199
Properties set #4 200
Properties set #5 201
Action 201
Mousecursor 202
Image 202
G APPENDIX VII: EVENTS CONTAINED IN COMPONENTS 205
n About this appendix 205
n Events 206
H APPENDIX VIII: METHODS 211
n About this appendix 211
n Methods 212
I APPENDIX IX: SOME MORE COMPONENTS 217
n About this appendix 217
n Some more components 218
Action_copy 218
Action_dataprops 218
Action_datatrack 220
Action_execute 220
Action_method 221
1
Frontend Designer
Introduction
The Frontend Designer course will develop your skills and background knowledge required
to effectively develop presentations for the windows client in Meta4 applications such as
Meta4 PeopleNet and Meta4 KnowNet.
The purpose of this course is to introduce you to the benefits, features, and functionality of
the presentations used in the windos interface within applications that use the underlying
Meta4 technology and tools.. You will have opportunities to practice with the software and
identify key benefits and efficiencies gained by using the Frontend Designer.
Upon completion of this course, you will be able to do the following:
n Master the Frontend Designer.
n Create well-designed presentations customized to your companys needs.
n Create effective interfaces for your Meta4Objects
n Describe what the Frontend Designer Wizard does when creating default presentations
for Meta4Objects.
Course objectives
2
To successfully meet the course objectives, you should meet the
prerequisites listed below.
Prerequisites
Other external knowledge
Windows environment
Relational Data modeling
Familiarity with programming
algorithms and programming
languages
Meta4 knowledge Find more information in...
Core Tools Training Guide - Data Modelling
Training Guide - Developing Basic
Functionality
Training Guide - Developing Advanced
Functionality with Meta4Objects
Introduction 3
This training guide is designed to support you in learning about the
Frontend Designer. Each Meta4 course consists of several lessons. Each
lesson is designed to streamline and accelerate the learning process. Our
lessons contain the following standard sections:
n Introductions
Describe what you will learn in the lesson and how it will benefit your
organization.
n Conceptual definitions
Explain Meta4 terms and functionality often using figures and
examples.
n Guided activities
Provide an opportunity for you to practice using the Frontend Designer.
We support you through the use of business scenarios and detailed step-
by-step solutions.
n Additional features
Describe complementary Meta4Mind Set utilities available to aid you
in developing functionality.
n Unguided activities
Provide an opportunity for additional practice using Meta4Mind Set.
These activities are more complex and challenge you to use what you
have learned throughout the lesson.
n Review questions
Check your mastery of the lesson objectives.
n Lesson summaries
Review the knowledge and skills you learned in the lesson.
Using the guide during the course
Throughout this course, use this guide to follow along with your instructor.
It includes pictures or diagrams your instructor may refer to in the class
presentation. Take additional notes throughout this book. During a guided
activity, you can refer to the instructions to the activity. At the end of a
lesson, check to see whether you are ready to complete the next lesson by
answering the review questions and reviewing the summary.
How to use the training guide
4
Using the guide after the course
After attending this course, you can refer to the definitions, examples, and
step-by-step instructions to help you while working with Meta4
applications using the Frontend Designer.
Introduction 5
Whenever you use Meta4 development tools to create functionality, you are
in fact developing business functionality that has already been previously
identified and defined in the Customer Requirements Analysis phase of the
Meta4 Project Implementation Methodology. Once the Customer
Requirements have been identified and the product installed, then in the
Customization phase of a project implementation, you can start building the
required functionality, using the Meta4 development tools. There is a
loosely defined procedure for customization using the tools, this is known
as the development cycle.
The very first step in this development cycle is to build the data model for
describing the specific customer data and its relationships to support
Meta4Objects, the cornerstone of the application business functionality.
Designing presentations in the development cycle
Figure 1. Positioning presentation designing within the development cycle
of the customization phase
CORE TOOLS
VERTICAL TOOLS
Customer
Requirements
Time Relational Data Model
Meta4Objects
ANALYSIS
DESIGN
Events
VT VT
VT
VT VT
VT
CUSTOMIZATION
PHASE
REQUIREMENTS
ANALYSIS PHASE
Frontend Designer
6
Once the data model and Meta4Objects that implement the desired
functionality are created, the next step is to present the information to the
user. This is where presentations come into play. These form the interface
to the application and its functionality particularly in the windows client.
A poorly designed presentation can spoil the entire underlying process, no
matter how good it is. Creating effective, well-designed presentations
dramatically enhance the usability of your application and improve the
efficiency of the department that has to work with the application.
Introduction 7
The course content is organized sequentially according to the way a you
build a presentation in a Meta4 application using the Frontend Designer.
You will be guided through the concepts and steps involved by following a
business case or several activities if appropriate.
About this course
Overview A high level structure of this
module and the key elements
forming the different processes the
module offers.
Lesson 1: Introducing the
Frontend Designer
Wizard
This lesson is an introduction to the
Frontend Designer tool. You will
learn the tool interface and start
creating your first presentation
using some basic controls
Lesson 2: Providing logic to
presentations: mode
OBL
In this lesson you will study the
event-action process underneath
presentations. You will start
providing more powerful logic to
your presentations.
Lesson 3: Advanced controls
and functionality
In this lessons you will study more
advanced controls.
Lesson 4: Connecting to
Meta4Objects
This is a key lesson. Here you will
learn how to link your presentations
to Meta4Objects.
Lesson 5: Exploring what the
Frontend Designer
Wizard does
Lesson 5 explores the structure of
default presentations created with
the Frontend Designer Wizard.
8
9
Frontend Designer
Overview
As you know from previous courses the logical architecture of the application
is divided in three levels: Database level, Application level, Presentation
level. The Presentation level is the user interface to the application. When
new functionality is created using the Data Model Designer and or The
Meta4Object Designer, an interface has to be created for that new
functionality. The Frontend Designer is the tool of Meta4Mind Works
devoted to the development of such interface.
In this section you learn the principal processes, concepts, and features of
Meta4Mind Set Frontend Designer.
Overview objectives
Objectives
Upon completion of this lesson, you will be able to:
n Understand where presentations come into play in the process of
developing new functionality with meta4Mind Set.
n Understand what the Frontend Designer is for, and how can be used
to effectively design presentations.
n Have a birds eye view of what the learning process in the course
will be.
10
In the process of building up a new functionality inside Meta4Mind Set
there comes a point at which the developer wants to use the Meta4Objects
already designed. This use of a Meta4Object is always provided trough a
presentation. In terms of the Logical Architecture we are entering the
Presentation level. This level comprises all software components used to
present information to the end user. Thus we shall define the user final
interface when we building a presentation.
The execution of a Meta4Object involves the load of the related data, but
those data can be shown only if a presentation is used. What this means is
the need of a presentation any time we want to see a Meta4Object.
A Presentation is the main interaction unit between the end user and
Meta4Mind. Any time a Meta4Object is invoked presentations are needed
and this also comprises internet/intranet and work flows.
Meta4Mind helps the developer build up default presentations by means of
a wizard. These default presentations enable the developer to choose the
Main Concepts
Figure 2. Steps of the basic "new functionality" process
Data Model Designer
Data model
Meta4Object Designer
Meta4Objects
Frontend Designer
Presentation
Task Designer
Task definition
Menu Designer
Menu option
Overview 11
final aspect of the Meta4Object depending on the desired functionality. You
can present a Meta4Object as a usual form, or as a list, or as a filter plus list
screen The wizard is what you have been using in Meta4Object basic
and advanced courses.
Most of the time changes and modifications to these default presentations
are required. To make this modifications you shall use the Frontend
Designer Tool. This tool enables editing and modifying presentations, and
also building up presentations disregarding the wizard. As a matter of fact,
the Designer Tool can be understood as an independent programming tool
and we will dedicate some time to learn how to use it.
This two approaches are reflected in the Frontend Designer Tool, for
when you enter the Frontend Designer, you are entering a set of different
tools:
n The Designer Tool, meant to build up programs in a highly portable
language. This also enables the modification of already made
presentations.
n The wizard, for constructing default presentations of different kinds.
The present course will first lead you trough the Designer Tool as an object
oriented programming tool, unrelated to Meta4Object. When the basic
aspects of the Designer Tool have been learned, you will learn how to
connect with Meta4Objects, gaining practice and familiarity through
examples. You will then understand what a default presentation is, and how
to modify it, no matter its final use (i.e., whether it will be used in intranet,
in a windows client, as part of a workflow...).
Figure 3. Roadmap of the course
Lesson 1.
Introducing the Frontend
Designer:Basic concepts
Lesson 4.
Connecting to
Meta4Objects
Lesson 5.
Exploring what the FED
Wizard does
Lesson 3.
Advanced functionality
Lesson 2.
Providing logic to
presentations: more OBL
12
13
Introducing the Frontend
Designer: Basic concepts
.
The Frontend Designer is the Tool of Meta4Mind Works that allows you to
create interfaces for your Meta4Objects, in other words: Presentations.
In this lesson you will be introduced to the Frontend Designer. You will
first learn what each of the sections of the FED (Frontend Designer) is for.
Once you have gained experience with the FED interface, you will start
learning about the basic structure of a presentation, and some of the basic
controls that will allow you to implement some elementary functionality.
.
Introduction
Lesson Objectives
Upon completion of this lesson, you will be able to:
n Identify the main components of the Frontend Designer Tool.
n Understand the structure of a very basic presentation.
n Create simple presentations.
n Identify some of the basic controls and their functionality.
Lesson 1.
Introducing the Frontend
Designer:Basic concepts
Lesson 4.
Connecting to
Meta4Objects
Lesson 5.
Exploring what the FED
Wizard does
Lesson 3.
Advanced functionality
Lesson 2.
Building logic into
presentations: more
OBL
14
How to access the functionality for this lesson
Select the following path:
If you select this path the following window opens:
Click the Frontend Designer option on the right panel, or double click the
same option on the tree and the Frontend Designer window will open.
Meta4Mind Menu Tree
Mind|Developement Tools|Presentations
Figure 4. Accessing the Frontend Designer
Introducing the Frontend Designer: Basic concepts 15
In order to fully open the structure of the Designer Tool you need to bring
the so called Presentation Browser (or Explorer) to the screen. The
Explorer is hidden by default. To open it select the option
View|Presentation Browser on the window toolbar.
Figure 5. The Frontend Designer window
Figure 6. The Frontend Designer with the Presentation Browser
16
Frontend Designer window structure
In the Frontend Designer window we differentiate the following main
sections:
n Window toolbar
n Title bar
n Left pane: Presentation browser
n Middle pane: Visual designer and OBL editor
n Right pane: Control Palette
Throughout the course we will be referring to this sections, so it is
important that you get familiar with them.
Conceptual definitions
Figure 7. Frontend Designer window sections
Introducing the Frontend Designer: Basic concepts 17
New Presentation
When you open the Frontend Designer a new presentation is displayed by
default.
Notice the that the title bar indicates that it is indeed a new presentation by
displaying the message New Presentation. Take a close look at the
contents of the Presentation Browser, youll see a two node tree. The
displayed presentation is at this moment a program. A presentation is a
program with a very special piece of code. If we looked at the code of this
program it would look something like this:
BEGIN The Program
Some code
END
The code in between the BEGIN and END instructions would contain the
definition of the components inside the presentation. In our case, this would
be Form1. You can visually see the form in the Presentation Browser or in
the Visual Designer (Middle Pane).
A form is a very special component. The windows the user sees when
interacting with the application are designed over forms. We will study
Figure 8. New Presentation
18
forms in more detail later in the chapter.
In case a presentation contains a form, its execution will promote the
construction of the form in run time. Lets study how to execute a
presentation and how the run time form is constructed.
Previewing a presentation
To preview your presentation select the Tools|Preview Presentation menu
option or click the Preview Presentation button on the window toolbar.
Closing the form brings you back to the Designer tool. Be aware of the
difference between the form in design time and run time. The form in run
time is displayed without grid lines. These grid lines are intended to help
you in further steps of the design process as it will be explained later on.
You can insert more than one form in a presentation. You will learn this in
the next section
Central pane: Visual Designer
From a design point of view a presentation can be understood as a working
area where different graphical and functional elements are arranged in
order to help (implement) a given functionality
1
. Those elements are
referred to as controls.
The form included in the new presentation is a control contained by the
presentation. Once inserted, the form will act as a visual interface between
the user and the application.
Inserting a new form in a presentation
Lets now insert another form in the presentation. To do so follow the
instructions.
1. Generally speaking any given functionality. In particular, if you are working inside
Meta4Mind Set your functionality has most probably been designed with the DMD and
the Meta4Object Designer. The presentation design can help the end user to fulfill that
functionality
Introducing the Frontend Designer: Basic concepts 19
The form displayed in the visual design pane shows handles around the
form. Those handles enable changes in the forms size.
Shifting from Form1 to Form2
Only one form is visible at a time in the visual designer. To shift back to
Form1 you can:
Notice that if you click the Presentation node in the Presentation
Browser, there is no object displayed in the visual design pane.
a. Right click the Presentation node in
the Presentation Browser and select
the option New Form
b. The "Form2" will appear in the
Presentation Browser and you will see
the new form in the visual designer
pane.
a. Click the Form1 node in the
Presentation Browser or
b. Use the combo box on the window
toolbar and select Form1
20
Changing the grid size
The grid is a design tool that will not appear in run time. Grids will help
you design the visual appearance of your forms. To change the grid size of
a particular form do the following:
Central pane: OBL editor
The middle pane also acts as an editor. We have already mentioned that the
presentation is acting as a program. That program can be represented by the
OBL language. The OBL code of the presentation is editable in the middle
pane.
Editing the OBL code of a presentation
To edit the OBL code of a presentation do the following:
a. Right click the desired form either in
the Presentation Browser or the
Visual Designer. A pop up menu will
appear
b. Select the option Change Grid Size. A
new dialog box will appear.
c. Determine the desired grid size and
click OK.
Introducing the Frontend Designer: Basic concepts 21
The whole presentation can be understood as a sequential execution process
and this interpretation is most evident when the OBL code is studied in
detail. We will go back to this fundamental topic later in this course.
Our presentation contains two controls: Form1 and Form2. You can see that
each control (form) is defined in the OBL code by a "BEGIN Form -
END" structure. The OBL in between those two sentences is the OBL code
corresponding to each control.
Closing the OBL editor
You will now close the OBL editor for the presentation. You have two
possibilities:
a. Right click the Presentation node in
the Presentation Browser. A pop up
menu will appear.
b. Select the OBL Editor option. The
code for the presentation will appear in
the middle pane
22
Lets now open the OBL editor for each of the controls in the presentation.
The OBL editor lets you open the code for a number of components at the
same time. It will not let you edit duplicate code. If you try to open the
OBL code for the presentation at the same time as the OBL code for any of
the controls in the presentation (say Form1 or Form2), a message appears
prompting you to close some OBL editors:
a. Click the Close button in the window
toolbar or
b. Select the View|View Editors menu
option, select the editor you want to
close and click the Close Editor(s)
button
a. Right click the Form1 node in the
Presentation Browser, and select the
OBL Editor option from the pop up
menu. The middle pane will show the
OBL code for the Form1 control only.
b. Repeat the same process right clicking
this time the Form2 node. The middle
pane will show a tabstrip with two tabs:
one tab for the Form1 control, and
another tab for the Form2 control. Each
tab contains the OBL code for the
corresponding control
Introducing the Frontend Designer: Basic concepts 23
The reason why this message doesnt appear when we try to open the OBL
editor for Form2, while the OBL editor for Form1 is open is that Form1 and
Form2 are disjoint. None is partly or fully contained in the other. In order to
open the OBL editor for the presentation you will have to close the OBL
editors for Form1 and Form2.
In later sections of the course you will learn that controls can be added to a
form or a presentation either visually (using the Visual Designer), or
adding their corresponding "BEGIN control_name END" structure
directly in the OBL code of the presentation.
Control palette
We have already spoken about controls and components. The Designer tool
has a great number of components, some of them visible. These are referred
to as controls. The Control Palette in the right pane includes the most
common visual components (controls).
The controls listed in the palette and a brief description of their meaning are
included at the end of the manual.
Up to now the only control we have dealt with is the Form control. Forms
are very special visual components that act as direct containers for other
visual components.
All the controls listed in the palette can be added visually to a form by
clicking and dragging.
Adding controls from the control palette to a form
Follow the steps to add a button control, a label control and a textbox
control to Form1 and a label control and a texbox control to Form2
Figure 9. Closing OBL Editors
24
a. Click the button control on the control
palette, then click the form and drag the
mouse to determine the dimensions of
the control.
b. Use the Label button and the Text Box
button in the control palette to place the
controls on the form
c. Select Form2
d. Insert a label and a text box repeating
the process explained above
Introducing the Frontend Designer: Basic concepts 25
Saving a presentation
In order to save a presentation, click the Save button on the window
toolbar. The Save dialog box will appear. We recommend that you use the
CXX_NAME_OF_YOUR_PRESENTATION syntax, where XX are
replaced with your initials. So if your name is Mike Smith and you want to
name your presentation Example_1, then the name would be as follows:
CMS_EXAMPLE_1. We also recommend that you save your presentations
with the Owner ID 101.
Adding controls to a form from the "Insert Component" option
Another way of inserting a control to a form is by means of the Insert
Component menu option. This is a pop-up menu option that appears when
e. Notice how the explorer reflects your
actions by inserting an icon for each of
the controls you insert in the
presentation.
Figure 10. Saving a presentation
26
right clicking the icon of the form in the presentation browser.
Follow the steps to insert a button in a form.
a. Right click the Form1 icon in the
presentation browser.
b. Select the Insert Component option.
The Component List window will
appear.
c. Select the Button icon and click OK. A
new button will appear on the left-upper
corner of the form.
Introducing the Frontend Designer: Basic concepts 27
First approximation to basic properties of visual components
Components have a number of properties. By giving certain values to these
properties you define the final behavior of the component. Simple and
intuitive properties are the Size, Backcolor or Font, among others.
You can access the properties of a certain component in design time in two
different ways: through the Properties dialog box or through the OBL
Editor.
Setting properties in design time using the Properties
dialog box
Any component in a presentation has several properties which are set to a
certain default value as soon as the component is included in the
presentation.
Any time we insert a new component in the presentation by selecting it
from the Insert Component menu option, the Alias property is
automatically set by the designer tool. This alias is the logical name you
shall use inside the program to invoke the component.
Lets start off with a brand new presentation. Create a new presentation by
clicking the New button on the window toolbar.
d. Drag the button to the desired position
in the form. Use the handles to resize
the control
28
Notice that after inserting the new form in the presentation, the component
is added to the tree in the left pane (presentation browser) with the name
Form2. This name is a property whose value has been set to Form2 by
default. You have not chosen it.
The set of properties of a given component can be seen in design time by
right clicking the component (either on the visual designer pane or in the
node representing the control in the browser) and selecting the Properties
option from the pop-up menu.
The following figure displays the Properties window for the Form control.
a. Click the New button on the window
toolbar to create a new presentation
b. Select the Blank Form option from the
New Presentation dialog box.
c. Insert a new form in the presentation.
Right click the Presentation icon in the
presentation browser and select the
New Form option from the pop-up
menu.
Introducing the Frontend Designer: Basic concepts 29
You can change (or set) a property value just by overwriting the existing
one on the corresponding row of the Property dialog box.
For example lets change the background color of the form.
Figure 11. Properties dialog box for the Form control
30
following are a number of exercises that will help you gain experience in
the management of control properties.
Control Label
a. Save this presentation as CXX_EXERCISE_2_1.
b. Insert a label in the form.
c. Open the Properties dialog box for the label and change the following
properties:
a. In the Properties dialog box for the
form, click the three-dotted button
located in the Backcolor row. A new
dialog box will appear.
b. Select the new color for the background
c. Click the OK button on the Properties
dialog box.
Introducing the Frontend Designer: Basic concepts 31
d. Click the OK button in the Properties dialog box.
e. Save your presentation.
f. Preview your presentation.
Notice that some properties are only seen in run time. That is the case for
the Mouse and Tooltip properties, which can be noticed when moving the
mouse over the label.
g. Finally, change the value of the properties Enabled and Visible from 1
to 0, and test the effects.
h. Save your presentation.
Control Image
a. Insert an Image control in the form.
b. Set the Image property to the value #Four. This value (#Four) refers to
a so called "fixed" image. You can find the rest of fixed images in
Appendix VI.
c. Insert a second image control. Set its Image property to
b_mapusa.bmp. See that the image is not seen in design time. This is a
non fixed image, i.e. a file stored in the disk. Save the presentation and
preview it. Notice how fixed images include the # character in their
name whereas non fixed images do not.
d. Open the Properties dialog box for Image2 and change the property
Stretch to True. Save and preview the presentation.
Property New Value
Text My Label
Font Tahona, 10pt, Underline
Borderstyle 1
Alignment 2
Forecolor any color (except for black)
Mousecursor Hand
Tooltip This is a label
32
Control Link
a. Insert a Link control in the form.
b. Change the following properties of the control:
c. Save and preview your presentation. Test the link.
Control Urlbox
a. Insert a Urlbox in the form.
b. Change the following properties of the control:
Notice that this control shows the page in design time.
c. Save and preview your presentation.
Control Combobox
a. Insert a Combobox control in the form.
b. A combobox usually displays a list with several options from which to
select. To get this functionality in run time, use the Values property of
the combobox.
Notice that there are no spaces between the values separated by commas.
One thing is the list of values that the end user sees in run time in the
Property New Value
Text Linking to Meta4
Tooltip Click to open
Url http://www.meta4.com
Property New value
Align Bottom
Url http://www.meta4.es
Property New Value
Values Monday,Tuesday,Wednesday,Th
ursday,Friday
Introducing the Frontend Designer: Basic concepts 33
combobox, and another is the actual values that the combobox uses
internally when selecting a specific option. For example, suppose that you
want to map Monday with the value 1, Tuesday with the value 2 and so on,
so that whenever you select the option Monday, the combobox stores the
value 1 instead of the string "Monday" (why you may want to do this will
become more clear in further examples). You can do this using the
Listitems property of the combobox.
c. Modify the following properties of the control:
Control Checkbox
a. Insert a Checkbox control in the form.
b. Change the following properties of the control:
Value = 1 means that the checkbox will be checked when running the
presentation.
c. Reset the Value property to 0 and see the effects is run time.
Control Groupbox
a. Insert a Groupbox in the form.
b. Insert a label and two checkboxes in the groupbox.
c. Try to move (in design time) the groupbox around the form. Notice
how the controls inside the groupbox move with it.
d. Preview the presentation.
e. Change the following properties of the groupbox:
Property New Value
Values 1,2,3,4,5
Listitems Monday,Tuesday,Wednesday,Th
ursday,Friday
Property New Value
Text Check this option?
Value 1
34
Notice that disabling the groupbox means disabling all the controls
contained in it.
Control Checkboxgroup
a. Insert a Checkboxgroup in the form.
b. Insert two checkboxes in the checkboxgroup.
c. Preview the presentation.
Notice that the checkboxes are acting as option buttons (radio buttons) in
run time. A set of checkboxes (as the ones seen in the previous section) can
be checked all at the same time. A set of option buttons allows the selection
of only one option per set (those inside the same checkboxgroup).
Control Textbox
a. Insert a Textbox in the form.
b. Change the following properties of the control.
Control Button
a. Insert a Button in the form.
b. Change the following properties for the control:
Property New Value
Text This is a group
Enabled False
Property New Value
Text My text
Font Arial, 12pt, Underline
Tabindex 1
Tooltip First in getting the focus
Introducing the Frontend Designer: Basic concepts 35
Control Slider
a. Insert a Slider in the form.
b. Change the following properties for the control:
Setting properties in design time using the OBL editor
Properties can also be set and changed in the OBL editor. You should be
aware that a number of properties do not appear in the Properties dialog
box, and they can only be changed using the OBL editor.
Property New Value
Text Click
Font Bold
Tabindex 2
Tooltip Second in getting the focus
Image #Currency
Property New Value
Forecolor any color (except for blue)
Maxvalue 30
Tabindex 3
Tooltip Third in getting the focus
Value 10
Tickfrequency 2
Orientation 1
36
Close now the OBL editor for the form by clicking the Close button on the
window toolbar and open the Properties dialog box for the form. You will
see that the Mousecursor property has been changed to "Hand".
Remember that any changes introduced with the OBL editor have to be
applied before they can take place. You apply the changes by clicking the
Apply button on the window toolbar. Notice also that whenever you do
some modifications in the OBL code for a component, an asterisk * appears
on the tab. That asterisk warns you that you have made some modifications
but have not applied the changes yet. Click the Apply button to apply the
changes. The asterisk will disappear.
The syntax checker
When the OBL editor is being used for writing code you can check the
program syntax before applying the changes.
The integrated syntax checker is activated by clicking the Check syntax
button on the window toolbar. This triggers a syntax inspection in the
selected OBL tab.
The syntax checker inspects the proper spelling of the OBL code and the
validity of properties and values, at a rate of about 1000 lines per second. In
case the spelling is correct a message box with the Syntax Successful
message is displayed. If the code contains errors a sub window is created at
the bottom of the OBL Editor pane, listing the errors encountered in the
checking process.
a. Create a new presentation
b. Right click the Form1 and select the
OBL editor menu option. The OBL
code for the form will appear in the
middle pane.
c. Add the following statement to the
code: Mousecursor = "Hand"
d. Click the Apply button on the window
toolbar for the changes to take place.
Introducing the Frontend Designer: Basic concepts 37
Feedback about errors comprises the following information:
n Line number in the OBL code where the error has been encountered
n Error identifier (Error number)
n A description of the specific error
n Total number of errors inside the checked OBL block
In the example shown in the figure above a number of errors where
encountered inside an Action_set block. The original OBL code is
displayed in the top half of the screen. Notice that the " character is missing
at the end of the second line. The third line begins with a misspelled set
property name. Finally, an Evclick was inserted into this block, which
represents an Action like component. This is an illegal insertion, for actions
do not accept events inside. You will learn more about actions and events in
further lessons of the course.
The lower part of the screen displays the error window generated after the
syntax checking process. You can follow up the errors with it. The OBL
editor also shows the position of the cursor (in terms of Line Number and
Column Number) in the Status Bar. This enables a fast localization of the
listed errors.
Double clicking an error line highlights the OBL line where the error was
encountered, thus this is a second method for identifying error lines inside
the program. The figure below displays the situation where the line
containing error n 5 (it appears as a selected line) is double clicked. Notice
how the BEGIN Evclick ev1 line is bold typed in the upper half of the
screen.
Figure 12. Errors in the OBL code
38
Do not forget to apply the changes before exiting the OBL editor pane,
even when a "Syntax Successful" message has been displayed.
Saving code from the FrontEnd Designer and inserting code into
the OBL editor
The fact that presentations can be interpreted in the OBL language opens
the possibility of storing OBL code in a file, and to a certain extent the
rearrangement of OBL code as if it were a text file.
Saving OBL code from the FrontEnd Designer
2
When the OBL editor is being used you can save a selected range of OBL
code by selecting the Edit|Save Selection menu option.
Figure 13. Errors in the OBL code II
2. You will learn that presentations stored as disk files can be invoked by means of the
STFORM.PTCMFTASK.
Introducing the Frontend Designer: Basic concepts 39
This opens a Save As dialog box. The file stored will contain the selected
code as if it were a common text file, i.e. ASCII format. Two file extensions
can be chosen, .obl and .txt. They happen to be identical but the .obl
extension might be helpful to identify the text files that contain OBL code.
Inserting code into the OBL editor
The files saved in the previous section can be inserted in a presentation,
when its OBL code is being edited. To do so just select the Edit|Insert File
menu option. The text in the file will be added to the code contained in the
current OBL editor tab.
Figure 14. Saving OBL code
Figure 15. Save As window
40
Presentation Explorer
The third pane in the Designer Tool is called the Presentation Explorer or
Presentation Browser. It is of great help when designing and also for
understanding basic aspects of presentations.
We suggest that you open the presentation CXX_EXERCISE_1 while
reading this section. Edit the OBL code for the presentation and pay special
attention to the Explorer tree.
In every presentation there is an underlying hierarchy of components acting
as containers for other components. In the first presentation that you
created, forms acted as containers for buttons, text boxes and labels, while
forms were contained by the presentation.
This is extremely meaningful to the understanding of presentations and we
will come back to this point at the end of this lesson.
At this moment just be aware of how the Explorer reproduces this
container/contained behavior at any level, in terms of parent nodes
(controls acting as containers for some other controls) and child nodes
(controls being contained by another control).
Each branch in the Explorer represents a parent component.You can add
components to a parent component.
Adding visual and non visual components with the explorer.
Events and Actions.
Not all the components available in the designer tool are included in the
control palette. In fact, many of them are non visual components, i.e. they
have nothing to do with visual design, but provide the mayor part of the
logic inside the presentation. Those non visual components are, mainly,
Events and Actions.
Events, actions, and in general non visual components, bring your visual
presentations to live. You can access the non visual components that can be
inserted in a specific component by:
1. Selecting in the explorer the node representing the component you are
going to use as a container.
2. Right clicking the selected node.
3. Selecting the Insert Object option from the pop-up menu.
The list of components is displayed in a window.
This is exactly what we did at the beginning of the course in order to
include a form in a presentation.
Introducing the Frontend Designer: Basic concepts 41
Do the following exercise where you are prompted to insert two non visual
components: one of type Event and the other of type Action.
Exercise
a. Insert an Evclick component in the Button1 control. The Evclick is a
non visual component.
b. Save an preview your presentation. Nothing will happen when you
click the button. Why?, you have not programmed what happens when
the user clicks the button. At this point the program recognizes the click
event for the button (you have done that by inserting the Evclick
component), but you have not specified what has to happen when the
event is invoked. You do that in the next step.
c. Insert an Action_message component in the Evclick component you
created in the previous step. Action_message is also a non visual
component.
d. Save and preview your presentation. If you click the button now, a
dialog box will appear.
Notice that not a line of OBL has been typed. Edit the presentations OBL
code and notice the changes.
Notice the structure:
Button1
Evclick1
Action_message1
Action_message is a non visual component that triggers a message box
which is displayed by default with no text and an OK button. Other options
can be implemented with the following properties of Action_message:
n Text = "My Message Text"
This will display a message box with the "My Message Text" message.
n Buttonflags = X
Where X stands for a number from 0 to 5. This will let you choose the
buttons you want to be displayed in the message box. The meaning of the
different options is explained in the table below:
Buttonflag OK Cancel Abort Retry Ignore Yes No
0 X
42
An OBL code as the following:
BEGIN Action_message Action_message2
Text = "OOOO"
Buttonflags=2
END
will display the following message box:
e. Add now another button to Form1.
f. Make this button open a third Form (it will be called Form3).
g. Save and preview your presentation.
In terms of the "Button
Event
Action" structure,
n Which is the role being played by Form3 in this example?
n Compare the behavior of Form2 and Form3.
Components as containers
In the above exercise you have noticed how the container/contained
1 X X
2 X X X
3 X X
4 X X
5 X X
Figure 16. Example of Action_message
Buttonflag OK Cancel Abort Retry Ignore Yes No
Introducing the Frontend Designer: Basic concepts 43
problem is of the greatest importance for OBL programming. In fact, it will
help you understand the keystone of OBL programming.
In order to get functionality in our example we have used three different
kinds of components:
n Visual components: Button1, and Form3.
n Non visual components:
n Evclick: for making the button able of triggering some process.
n Action_message: for telling the program what to do, i.e. show a
message.
In general, presentations must be understood as programs composed of
these three elements:
n VISUAL COMPONENTS
n EVENTS
n ACTIONS
Generally speaking if you want a visual component to react to some event
in order to execute some other process you should follow the structure:
1. Select the visual component.
2. Insert the kind of event that will trigger the process.
3. Translate the process into actions that must be sequentially contained
inside the event.
If you try to add the Action_message action inside Button1 without the
Evclick1 nothing will trigger the action although it is in the program.
Nodes and their hierarchical interpretation
When referring to a given component inside a presentation the Explorer
tree gives you the complete reference name of that component.
As an example, in a presentation like the one in the figure below the text
box would be referred to as: Presentation/Form1/Groupbox1/Tabstrip1/
Tab1/Textbox1
44
This is exactly the path given by the explorer. Notice that if there is some
non visual component in between the presentation node and the component
you want to refer to the only way of getting the complete dependence is by
means of the Explorer. That is the case for a form being called from an
Evclick inside a button.
Introducing OBL
OBL is built up of three levels:
1. LEVEL ONE: EVENTS
2. LEVEL TWO: ACTIONS
3. LEVEL THREE: VISUAL
Understanding this structure helps in getting a global idea of what we are
doing when programming in OBL.
Figure 17. Example of component path
Figure 18. OBL levels
EVENTS
ACTIONS
VISUAL
FORMS
Introducing the Frontend Designer: Basic concepts 45
You will learn that there are a couple of OBL elements which do not lie
exactly inside any of the above mentioned categories, being of the greatest
importance for programming purposes.
When writing an OBL program we have to obey the following structure:
An event marks the beginning of certain actions, which are the elements
we use to execute commands. Events are contained inside visual
components.
Appendix I shows a number of controls and the related objects that can be
inserted inside them.
What is behind a running presentation?
Events and actions are mortal components. Visual elements are immortal
components. What this means is that when executing an OBL program,
any non-visual element dies away. At the end, just the visual components
survive, with their related OBL code.
An OBL program begins with an event, but it has to be a special one in
order to be independent of any visual component, for at the beginning of
the execution no visual component has been created yet. This special event
will be the Presentation object that will act as a global container.
According to this we can understand a presentation (which is nothing else
than a special event) as a sort of flow process that contains a series of
actions.
Events act as triggers for a set of actions to take place. Its like running an
MSDOS bat file, consisting of commands. The event would be the bat file
itself, which is the 'object' that can be run. And the execution of this bat file
triggers the sequential execution of the commands it contains. Those
commands would act as Actions do.
A bat file 'dies away' when it reaches its end. But the effects can endure.
The same happens to a presentation. Enduring elements of a presentation
are, among others, the visual interfaces the end user sees.
Figure 19. OBL program structure
BEGIN Event
END
BEGIN Action
...
END
46
Where is that visual interface? Where do visual components lie? How do
they take part in presentations?
We have already said that events are contained inside visual components,
exception made for the Presentation event. But we still need a link
between our initial event (the presentation) and, for instance, a textbox
appearing on the screen. Some element connecting an event with a visual
component able to contain other visual components an subject of being
contained by the Presentation. This very special component is the Form.
Forms act as elements between visual components and actions. Its visual
side is obvious. Its action side means the appearance of the visual
components it contains, when the presentation has been executed.
As forms are visual components they endure after the presentation is over.
This is why a presentations OBL code will follow an structure like:
BEGIN Presentation PresentationX
BEGIN Action ActionXXX
END
g. Insert a Listgroup control in Tab1 of Tabstrip1.
The Listgroup control includes a first block of data properties (data header
in the OBL code listed above). This block must identify the item around
which the ZLG is going to be built. In our example ID_PAY_TYPE.
Listgroup properties include one which plays a mayor role, the
Watchobject. Remember we shall create a ZLG around a certain item (in
our example ID_PAY_TYPE). This item's value is to be seen through a
certain presentation control, most typically a textbox like TextboxW in the
figure, i.e. a certain presentation object is receiving the value of the item
acting as the keystone of the whole ZLG.
The whole TextboxW.Visible construction is called the Watchobject.
When the Visible property of the Watchobject is set to True validations are
enabled.
Then a number of blocks are defined, each of them collecting the necessary
data for implementing the Zoom, the List, the Validate and the Clear
functionality. Each one of this blocks is an event-like component called
Function. Thus you will distinguish:
n Function List
n Function Zoom
n Function Validate
n Function Clear
At least one Function component is mandatory inside a Listgroup.
Opening the property dialog of a Listgroup control will display a number of
tabs that will help you systematize all the information required by the
Connecting to Meta4Objects 139
Listgroup control.
h. Open the property dialog of Listgroup1.
General properties of Listgroup
Data properties of the Listgroup control must reflect the fact that we are
dealing with that special Meta4Object item (in our example
ID_PAY_TYPE), thus they must be assigned a non null value that
particularizes up to the item itself.
i. Inside the dialog of Listgroup1, set the data properties to their
corresponding value. The following figure will help you.
j. Write the path reference of the Watchobject in the corresponding
textbox. Remember to give the reference and the property whose
boolean value will enable or disable validations.
*O*../Textbox5.Visible
Figure 77. General Properties of the Listgroup control
140
In this General tab the three Meta4Objects you will deal with have to be
identified. The central one is already included in the General Props frame.
The second frame will collect data about the Meta4Object invoked for the
List and Validate methods.
The third frame copes with the Meta4Object containing the Zoom method.
k. Identify each Meta4Object.
l. Give the required parameters for the List Meta4Object and the Zoom
Meta4Object frames.
Function properties
Up to now you have just begun with the basic aspects of a ZLG
construction. To get on with the following steps giving a thought on what
you are doing with all this Meta4Objects and methods becomes necessary.
The following discussion will be focused on the Validate Function for. At
the end of this section the other Function blocks will be explained.
Refer to the figure above when needed. The Alias is written belowbelow
each control for guidance. The following figure shows the records in the
Track Meta4Object, i.e. the records of table CMP_PAY_TYPES.
Passing data Part I - Mainargs and Mainobjs
n What happens when a new value is written in Textbox5?. It was stated
above that when loosing focus the Evvalidate comes into stage
triggering the following process:
Figure 78. Zoom List Group II
Figure 79. Records in the Track Meta4Object
Label5 Textbox5 Textbox15 Button1
Connecting to Meta4Objects 141
1. What is written inside Textbox5 must be validated against the table
of the Track Meta4Object.
2. In case validation is correct then the Track Meta4Object must send
back the value to be displayed in Textbox15.
3. For simplicity the not validate case will be discussed later on.
n In terms of presentations and Meta4Object:
1. you have to pass the value of *D*ID_PAY_TYPE (what is written
in Textbox5) to the track Meta4Object.
2. the track Meta4Object must receive the *D*ID_PAY_TYPE
value and run its Validate method.
This information flow has to be done using some argument of the track
Meta4Object. Remember this track Meta4Object was generated by the
DMD Wizard. This extremely well programmed tool defines the
parameters needed in the List, Validate and Zoom methods as the column
name preceded by the string ARG_ string. Thus, in your example, an
argument called ARG_ID_PAY_TYPE has been defined by the DMD
Wizard both in the Track and in the Maintenance Meta4Objects.
In a certain way what is needed here is a sort of assignment of the kind:
10
ARG_ID_PAY_TYPE=*D*ID_PAY_TYPE
Remember that, in this example, as we are dealing with TR and MT
Meta4Objects generated by the DMD wizard the name of the argument to
be used by all the methods in TR and MT Meta4Objects we shall invoke is
the same.
Now the question is how to make the
ARG_ID_PAY_TYPE=*D*ID_PAY_TYPE assignment. And here again,
we can use the Listgroup dialog.
Click the Source Data button in the Listgroup General Props property
dialog and write the corresponding data as stated in the following figure. To
enable the insertion you must click the + symbol at the right border of the
Source Data dialog.
10. WARNING: This is NOT to be understood in terms of a proper syntax use. This would
be a completely invalid sentence.
142
Notice that this is a General Property of the Listgroup control, thus this
assignment can be used by this control independent of which Meta4Object
you want to pass *D*ID_PAY_TYPE to.
Passing data Part II - Targetitems and Targetobjs
Now, you have just enabled the passing of values between the origin
Meta4Object (in your example CMP_M4O_COSTS2) and the TR and MT
Meta4Objects. Lets go on with further steps.
m. The Track Meta4Object executes the Validate method. If the
ARG_ID_PAY_TYPE is validated against table CMP_PAY_TYPE, the
method returns the value of all fields in the record with the Position in
list property different from zero. In your example the column
N_PAY_TYPE has Position in List = 2. So this has to travel back from
the Track Meta4Object to the presentation where the Listgroup is
included.
How do these values travel back to your presentation?. Generally speaking,
what you need now is another assignment but this time the value sent by
the track Meta4Object will be received by a presentation object. From now
on, a so called Targetitem (the one coming from the Track) passes its value
to a so called Targetobject (the presentation component where the
Targetitems value is to be written).
This assignment has to be stated inside each Function tab.
You are dealing with the Validate Function in the example, so open the
Validate function tab as shown in the figure below.
The value of N_PAY_TYPE for a given record has to be collected in the
presentation.
Figure 80. Source data properties
Connecting to Meta4Objects 143
Which object in the presentation is the one receiving the value sent by the
Validate method? Look at the figure above, Textbox15 (what is somewhere
called a virtual field) is the object. Its property.Text is the one that can get
the N_PAY_TYPE value. Thus, in terms of this assignment you would
have something like:
11
*O*/Presentation/Form1/Textbox15.Text = N_PAY_TYPE
This is what you state in the Validate tab. Just remember:
This would establish the parameters for the Validate Function block.
Here are some comments on the rest of the Function blocks defined in
Listgroup control.
Figure 81. Validate Tab
11. AGAIN: This is not to be understood in terms of a proper syntax use. This would be a
completely invalid sentence.
Targetobject Targetitem
*O*/Presentation/Form1/
Textbox15.Text
N_PAY_TYPE
144
Function Zoom
This Function invokes the Zoom method in the Maintenance Meta4Object
when clicking on Label1. It must display the Maintenance presentation
built over the MT Meta4Object, but show only the record corresponding to
the *D*ID_PAY_TYPE (passed by the Source Data assignment). No data
returns from the MT Meta4Object thus, the Function Zoom tab would be as
shown in the following figure.
Function Clear
In this case the text property of the virtual fields in the presentation have to
be cleared, thus, in your example, you would have:
Figure 82. Zoom tab
Figure 83. Clear tab
Connecting to Meta4Objects 145
Function List
Function List has to be ready to receive the value of the columns of the
record selected in the List Meta4Objects presentation that have the
property Position in List different from zero, included the one
corresponding to the *D*ID_PAY_TYPE column.
In our example:
Now, the Listgroup control is ready to be invoked from the controls of our
presentation.
Invoking the Functions in the Listgroup Control
Now you will finally implement the whole ZLG functionality.
Figure 84. Function list tab
146
To begin with, every control that will be used to invoke one of the
Listgroup Functions has got to have the following property values:
n Idchannel = "MyChannel"
n Idnode = "MyNode"
n Iditem = Depends on the control
n Dependson = "*D*ThePresentationItem"
In our example:
n Idchannel = "CMP_M4O_COSTS2"
n Idnode = "COURSES"
n Iditem = Depends on the control
n Dependson = "*D*ID_PAY_TYPE"
We list the OBL code inside each control.
Label
You need the Function Zoom when clicking. Thus:
BEGIN Label Label5
Idchannel = "CMP_M40_COSTS2"
Idnode = "COURSES"
Dependson = "ID_PAY_TYPE"
Text = "##TM[ID_PAY_TYPE]"
BEGIN Evclick ToZoom
BEGIN Action_call CallZoom
Sentence = "*O*../../../Listgroup1.Zoom"
END
END
END
Connecting to Meta4Objects 147
Textbox (non virtual fields)
Refer to the figure that shows you the structure of the CMP_M40_COST2
to remind yourself of the functionality you want to build from this object.
Double click must trigger the List Function, and Evvalidate the Function
Zoom.
BEGIN Textbox Textbox5
Idchannel = "CMP_M40_COSTS2"
Idnode = "COURSES"
Iditem = "ID_PAY_TYPE"
Dependson = "ID_PAY_TYPE"
Collabel = "##TM[ID_PAY_TYPE]"
BEGIN Evvalidate ToValidate
BEGIN Action_call ToValidate
Sentence = "*O*../../../Listgroup1.Validate"
END
END
BEGIN Evdblclick ToList
BEGIN Action_call ToList
Sentence = "*O*../../../Listgroup1.List"
END
END
END
Textbox (virtual fields)
When double clicking it call the Validate Function.
BEGIN Textbox Textbox15
Idchannel = "CMP_M40_COSTS2"
Idnode = "COURSES"
Editable = False
Dependson = "ID_PAY_TYPE"
BEGIN Evdblclick ToValidate2
148
BEGIN Action_call ToValidate2
Sentence = "*O*../../../Listgroup1.Validate"
END
END
END
List button
You will invoke the List Function:
BEGIN Button Button1
Idchannel = "CMP_M40_COSTS2"
Idnode = "COURSES"
Iditem = "ID_PAY_TYPE"
Image = "#List"
BEGIN Evclick ToList2
BEGIN Action_call ToList2
Sentence = "*O*../../../Listgroup1.List"
END
END
END
Advanced properties of the ZLG
By default, the presentations raised for the Track and Maintenance
Meta4Objects are:
Track Meta4Object
n Its presentation is generated in run time so you dont need to create
a presentation for this Meta4Object.
n If you need to raise a specific presentation built for this
Meta4Object you can change this default behavior by specifying
the presentations ID in the Function List tab. See the figure below.
Connecting to Meta4Objects 149
Maintenance Meta4Object
n The presentation has to be available for this time it is not generated in
run time. By default, the default maintenance presentation is invoked,
i.e. the one with a name as the single-node Meta4Object plus the
_MT_ string. In our example that would be CMP_MT_PAY_TYPES.
n If you want to invoke another presentation instead of the default one
you can change the Idinstance in the Zoom Function tab.
To understand the flow of these two functions the OBL code for Function
List is listed in the following figure. See that inside the Function block a
Presentation Meta4Object control is inserted.
Figure 85. Idinstance in the Function List tab
Figure 86. Idinstance in the Function Zoom tab
Idinstance = TheListPresentationToBeRaised
Idinstance = TheMaintenacePresentationToBeRaised
150
This in turn contains an Extends, whose Idinstance is #Default_list, i.e.
the presentation will be created in run time. Changing the value of
Idinstance here or in the Function List tab is equivalent.
The Presentation Preload block parameters can also be changed in the
OBL editor or in the Function List tab.
The Inheritdata property has to be set to 1 in order to allow the sharing of
data between the initial Meta4Object and the Track (or Maintenance)
Meta4Object.
Notice that the parameters given in the General Props tab identifying the
related Track Meta4Object are referred here as Idfuncchannel,
Idfuncnode and Idfuncmethod enabling an easy identification of the
information related to the initial Meta4Object or to the rest of the
Meta4Objects.
In case the item is part of a foreign key the parent and son listgroups can
be linked through the properties (General Props Tab) ParentListGroup
and SonListGroup. Several parents can be included separated by commas.
If ParentListGroup has a non null value, after invoking the list method
from the son the Validate method of the parent is invoked.
If SonListGroup has a non null value, deleting the value of the item in the
Figure 87. OBL code for Function List
BEGIN Function List
Idfuncchannel = "CMP_TR_PAY_TYPES2"
Idfuncnode = "CMP_TR_PAY_TYPES2"
Idfuncmethod = "LIST"
Mainobjs = "ID_PAY_TYPE"
Mainargs = "ARG_ID_PAY_TYPE"
Targetobjs = "ID_PAY_TYPE,*O*/Presentation/Form1/Textbox15.Text"
Targetitems ="ID_PAY_TYPE,N_PAY_TYPE"
BEGIN Presentation Preload
BEGIN Action_preload Default1
Onok = "END_OK"
Oncancel = "UnloadForm"
Availablesteps = 12
Loadchannel = False
Actionnew = False
END
END
BEGIN Presentation MetaObject
BEGIN Extends Default2
Idchannel = "CMP_TR_PAY_TYPES2"
Inheritdata = 1
Idinstance = "#Default_list"
END
END
END
Connecting to Meta4Objects 151
parent calls the Clear function of the son.
When foreign keys are around the Mainargs/Mainobjs assignment can be
not enough for our Function. Properties Sourceargs and Sourceobjs
enables further assignments in the block.
Finally we will mention the way in which internal flow takes place when
invoking Listgroup functions.
n List flow:
1. Presentation Preload is executed
2. List Meta4Object is created
3. The List method in track Meta4Object is executed
4. In case no data are to be shown in the List node an error message
appears and the flow dies away.
5. If only one record is loaded in the List node then its value is copied to
the initial Meta4Object.
6. Presentation Meta4Object is executed.
7. If click on Cancel Function Clear is invoked and the flow dies away.
8. Copy values in List node to the initial Meta4Object.
9. End of the flow.
n Validate flow:
1. Validate Meta4Object is created.
2. The validate method is executed.
3. If there is no data on the Validate node List is invoked.
4. If there is more than one record in the Validate node List is invoked.
5. If there is only one valid record values in the Validate Meta4Object are
copied to the initial Meta4Object.
The Record Insert Wizard and the ZLG
When running the Record Insert Wizard over data that contain relations in
the dictionary with other tables there is the possibility of generating the
whole ZLG. This means all the visual components plus the Listgroup
control.
Moreover if the generated ZLG is a candidate for having a parent ZLG the
wizard will prompt an option to construct both ZLGs at the same time. This
will be shown through an example.
152
a. Open a new presentation and activate the Record Insert Wizard.
b. Select the STD_MT_SUB_GEO_DIV Meta4Object and when its items
are listed, select the STD_ID_GEO_DIV item. The figure below shows
the relations that will be encountered by the wizard over the data
contained in the Meta4Object.
c. Notice the relation established though STD_ID_GEO_DIV. This would
mean a ZLG in a Default FrontEnd presentation. This is exactly what
the Record Insert Wizard suggests as you can see in the right side in the
figure below.
d. In case you want to ignore the ZLG generation possibility just click on
the Other Components option button. A label and a textbox will be
used.
e. If the ZLG is to be generated, the wizard will look for further relations
in the dictionary. In the figure above a second relation is present. That
would mean two ZLG in a default presentation. One for
Figure 88. Data Model II
Figure 89. Using the Record Insert Wizard to generate a ZLG
Connecting to Meta4Objects 153
STD_ID_GEO_DIV and another one for STD_ID_COUNTRY. The
wizard brings this option by displaying the dialog shown in the next
figure. Clicking in the STD_ID_COUNTRY option will lead to the
hierarchical generation of both ZLGs.
f. Finally the figure below shows the result of the whole process.
Figure 90. Using the Record Insert Wizard to generate a ZLG II
Figure 91. Final result
154
Working with tracks
For optimization reasons in many cases a track Meta4Object is connected
to the Meta4Object we want to work with
12
. Remember this is done by
means of a List connection between the two Meta4Objects.
To see how a track connection is implemented through the Designer Tool
you will work with a Meta4Object built from the Meta4Object you have
been working with, but linked to a track Meta4Object. The track
Meta4Object is normally created with the Data Model Designer wizard. .
In the example used below, the list connector is of a 1:N type and only one
field of the PK has been used. This has been done for learning reasons.
Exercise
Lets build a presentation for a Meta4Object based on
CMP_EXAMPLE_TRACKS_0.
a. Open presentation CMP_EXAMPLE_TRACKS_0 and save it as
CXX_EXAMPLE_TRACKS_1. The presentation is shown below.
Where Scrollpanel1 contains textboxes linked to the parent node of
CMP_M40_COSTS3 Meta4Object, and Scrollpanel2 the ones linked to
the same Meta4Objects child node.
12. Why a track and how the connection is established is far beyond our present scope. Refer
to the advanced aspects of Meta4Object design.
Figure 92. CXX_EXAMPLE_TRACKS_0 presentation
Connecting to Meta4Objects 155
If you test this presentation a QB form will appear, followed by a List form,
both being related to the QB node and List node of the Track Meta4Object.
Finally after choosing one record from the Track List you will see Form1
with the data corresponding to the first record loaded in the parent node of
CMP_M4O_COSTS3.
No navigation buttons have been included in
CXX_EXAMPLE_TRACKS_1 presentation.
a. Add a Navigationgroup in Scrollpanel1 and another in Scrollpanel2.
Save your presentation.
Figure 93. Source Meta4Object
Figure 94. The corresponmding track and its structure.
156
Figure 95. List connector
Figure 96. Track
Connecting to Meta4Objects 157
Now, in order to understand what is happening in terms of records and
nodes, take a look at the schema in the next figure.
Figure 97. Initial Meta4Object
Figure 98. Maintenance Meta4Object
158
b. Test your presentation following the steps of the figure above. Notice
that when selecting in the List form the second record all records in the
with the same DT_START value are loaded in the Root node.
Toolbar Navigation Groups
When list connectors are defined as 1:N it becomes important to enable the
end user to navigate through the List node. Some specific controls have
been included in the Designer Tool to facilitate navigation. The following
tables display their main features.
Figure 99. The Frontend Designer with the Presentation Browser
List connector
(by DT_START)
ROOT NODE
CMP_M4O_COSTS3
CHILD NODE
TRACK
QB NODE
TR NODE
STEP 1.- QB form
STEP 2.- List form
STEP 3.- list is 1:N by DT_START.
Load in Root & Child
Image Type Meaning Classname
Navigation
Group
Navigates through
the related node
Toolbarnavigationgroup
NavRoot
Group
Navigates through
the parent node
Toolbarrootnavigationgroup
NavTrack
Group
Navigates through
the track node
Toolbartracknavigationgroup
Connecting to Meta4Objects 159
To get some practice, complete the following instructions:
a. Add the corresponding Navigation Groups to your presentation in
order to be able to navigate through the Track. Use Scrollpanel3 for the
Toolbartracknavigation control.
b. Save and test your presentation.
Specific patterns
Pattern objects become very useful when tracks are used, and as is the case
with Navigation Groups, a number of specific pattern objects have been
included to simplify your work. The following table includes some of them.
Image Action Meaning Classname
Firstdoc Moves to the first record
loaded in the track node
Button
Lastdoc Moves to the last record
loaded in the track node
Button
Nextdoc Moves to the next record
loaded in the track node
Button
Previousdoc Moves to the previous
record loaded in the track
node
Button
Document #Docindex Number of present record
#Doccount Number of records in the node
#Docnodestr Shows the nodes items
Track
node
#Trackindex Number of present record in the track node
#Trackcount Number of records in the track node
#Tracknodestr Shows track nodes items
Root node #Rootindex Number of present record in root node
#Rootcount Number of records in theroot node
#Rootnodestr Shows root nodes items
Current
node
#Index Number of present record in current node
#Count Number of records in current node
#Nodestr Shows current nodes items
160
Here are some examples:
n Node counters:
BEGIN Patternbox MyPattern1
Pattern = "([#Index]/[#Count])"
Borderstyle = 0
Idchannel = "MyChannel"
Idnode = "MyNode"
END
n Node structures:
BEGIN Patternbox Mypattern2
Pattern = "[#Nodestr]"
Idchannel = "MyChannel"
Idnode = "MyNode"
END
Pattern objects also accept the scope modifier *T* at the beginning of the
Figure 100. The Frontend Designer with the Presentation Browser
Figure 101. The Frontend Designer with the Presentation Browser
Patternbox in run time
Index number of
current register
Total number
of registers
loaded in the
node
Connecting to Meta4Objects 161
pattern value (e.g. *T*#Count). The meaning of this modifier is to refer the
object to the track node, if any.
In order to practice add counters and node structure controls to your
presentation.
Steps in the preload
Remember that when the table over which you build a single-node
Meta4Object is defined as non cacheable, Track Meta4Objects generated
with the DMD Wizard have a QB Free node plus a List node.
In run time, if a Track has been connected to a certain Meta4Object you
will get the sequence already described, i.e.
1. QB - step
2. LIST - step
3. Connection
4. Load in the Meta4Object
There are two more cases in which a certain step must be taken before the
final Meta4Object is loaded:
a. dynamic filters defined in the Meta4Object
and / or
b. properties defined in the Meta4Object with node scope
(parameters).
I n summary, there are four possible preload steps:
The Action_preload control lets you modify the number of steps that will
take place in the Meta4Object preload process as was mentioned in
previous sections. Remember this was attained through the property
Step Meaning Defined in...
QB Filter the list presented by the list
node of the track
Track Meta4Object
LIST Lists records charged in the List
node of the track
Track Meta4Object
Dynamic Filter Filters the records to be loaded in the
Meta4Object
Source Meta4Object
Parameters Filters according to the value of a
property defined with node scope.
Source Meta4Object
162
Availablesteps.
Now that you have learned how to take control over the display of different
records in a node you will understand the potential of the Avaliablesteps
property.
Please follow the steps:
a. Edit the OBL code of Action_preload1. Add the line:
Availablesteps = 31
b. This will make no change in the preload for 31 means a 11111 mask,
i.e. all available steps.
c. Save and test your presentation.
d. Change now Availablesteps to 3 (i.e. 00011 ). Save and test your
presentation. Notice the following features:
n The list is not displayed.
n The first record in the parent node is loaded.
n When navigating through the track node the transaction to the
parent node is done in blocks according to the condition set in the
List connector (in our example DT_START).
See that the field used by the List connector is not editable in run time (see
figure below).
Preload steps Mask number Binary code
Choose list dialog 1 00001
Filter list dialog 2 00010
Filter channel dialog 4 00100
Ask parameters dialog 8 01000
Display list dialog 16 10000
Figure 3. The Frontend Designer with the Presentation Browser
Connecting to Meta4Objects 163
e. Change now Availablesteps to 2. Save and test your presentation.
Notice the following features:
n Track navigation buttons are disabled.
n The whole block is loaded in the parent node.
n DT_START related textbox is now enabled.
f. Try the rest of the Availablesteps values.
Conditional object construction
Suppose you want to add to your CXX_EXAMPLE_TRACKS_1
presentation a button showing the list of records in the track node. Here is
the OBL code of such insertion:
BEGIN Button Button1
Idchannel = "CMP_M4O_COSTS3"
Idnode = "COURSES"
Image = "#Showlist"
BEGIN Evclick EvclickList
BEGIN Action_preload Action_preload2
Onok = "END_OK"
Oncancel = "UnloadTheForm"
Availablesteps = 31
END
BEGIN Action_call UnloadTheForm
Sentence = "*O*/Presentation/Form1.Unload"
END
END
END
Please do the following exercise:
Exercise
a. Add the Show List button with the OBL code listed above. Save and
test your presentation.
Suppose now that you dont know whether the CMP_M4O_COSTS3
164
Meta4Object has got a track connected to it. The Show List button would
result as meaningless in case no track is linked.
The Designer Tool provides a mask for conditions that have to be checked
before an object is constructed in run time. The mask is applied to the
property Constructif which is available in a number of controls.
n Constructif: Syntax.
Constructif = ValueOfConditionMask
b. Add a suitable Constructif condition to the Show List button. Save
and test the presentation.
c. Open CXX_EXAMPLE_ZLG presentation and reproduce the Show
List button. Test its proper behavior. Remember this presentation was
constructed over the CMP_M4O_COSTS2 Meta4Object which was
not connected to a track.
Value Meaning
1 Object (and contained objects) are constructed only if a track is
connected
2 Object (and contained objects) are constructed only if a track is
NOT connected
4 Object (and contained objects) are constructed only if a track is
connected through a List connector of 1:N type
8 Object (and contained objects) are constructed only if the
Meta4Object has NOT been loaded
16 Object (and contained objects) are constructed only if the
Meta4Object has been loaded
Connecting to Meta4Objects 165
Multicompany features in presentations
Default and customized presentations
If you remember, in the Core Tools course you learnt that you can generate
default presentations that consider multicompany features. If you select a
Meta4Object that is multicompany-enabled, you must decide whether you
want the corresponding presentation to be multicompany or single
company.
If you decide that it is single, that is to say, you do not activate the
multicompany feature, the company field is hidden and you cannot display
it on screen.
Now, If you choose to create a multicompany presentation, in the
presentation toolbar a new button is added to open the company selection
window.
What happens if instead, you want to build from a multicompany
Meta4Object, your own presentation, rather than use the default?
The outcome of your multicompany enabled presentation allows the end-
Figure 4. Enabling multicompany features in default presentations
166
user to select which company to filter for.
Assuming that you are already familiar with the procedures for building
your own presentations from exisiting Meta4Objects, what you need to do
is:
n Add the corresponding toolbar control, a button, for the multicompany
feature to your presentation. Upon clicking this, you need to display a
filter for the different companies.
n Associate a filter that contains the list of values for companies, the
parameter invoked by the button in the presentation.
n Add the corresponding menubar entry. The details of how to do this
have already been covered and will not be discussed here.
Figure 5. The outcome of your multicompany enabled presentation
Connecting to Meta4Objects 167
Customized presentations - params group type element for
toolbar
In this case, the toolbar button type you create for the multicompany feature
is set to the value, toolbarparam group. .
Figure 6. Inserting a multicompany button with the toolbar param group
1. In the Formmain part of your
presentation that you are creating,
double click over the toolbar area.
2. Click the Buttons tab.
3. Click insert to add a new control,
a button.
4. Select Params group for type to
insert the multicompany button.
168
Using the Toolbar Editor, make sure that you select the param group type
when you define the new element for the toolbar, as this specifically adds a
group of parameters for the multicompany feature. This by default includes
a button for dates and another for company usually.
Customized presentations - button type element for toolbar
Alternatively you can also add an ordinary button to perform the same
function. The procedure in this case is different, as shown and dicussed in
the figure below. In this case, the toolbar button type you create for the
multicompany feature is set to the value, button.:
Figure 7. Adding a button type element for multicompay to the toolbar
1. In the Toolbar Editor, for the
Meta4Objec indicated in idchannel,
select Button for Type in General
Properties.
2. Add additional details such as
name, text, image type to use.
3. Indicate whether it is visible,
enabled and does something when
click enabled.
6. Just as standard button events, you need
to add instructions for loading and off-
loading. Here you have Action.preload
where you specifically use 32 ifor
Availablesteps to invoke the corresponding
companies filter.
7.. Select Params group for type to insert
the multicompany button
4. Your end-result after atdding
the button.
5. Select Properties to add
eventclick controls.
Connecting to Meta4Objects 169
Check your understanding of the current lesson by answering the following
review questions.
1. How do you load data into records of a presentation?
2. In a presentation how do you make a method executable?
3. How do you graphically represent the status of the current record
in the node?
4. How do customize a presentation so that you can invoke a task
from it?
Review questions
170
Lesson key points...
n All data and loading functionality of a Meta4Object can be
implemented in one or more presentations.
n To navigate through the records based on data in a Meta4Object, add
toolbar navigation controls, datagroup and edit group controls.
n In a presentation, the Action type controls invoke instructions
embodied in methods or tasks for a given Meta4Object.
n The list/validate group control allows you to add a link to the
presentation of the maintenance Meta4Object for data entry, to add
another two links to the presentation for the track Meta4Objec to
validate the data entered against the data in the track and to filter
records through the track Meta4Object.
n Use pattern objects to display the current record number, total number
of records in current, track or root node, as well as to display node
items.
n Adding multicompany features is automatically done in a default
presentation, if the multicompany feature is enabled. Otherwise, it can
be customized as a toolbar button and a menubar option.
You should be able to...
Lesson summary
Build in all the functionality implemented in a Meta4Object
into a presentation.
Add navigation toolbars to navigate through records in a
presentation.
Run methods from a presentation.
Add multicompany features to a presentation
Use advanced controls and properties to add more functionality
to a presentation.
171
Exploring what the Frontend
Designer Wizard does
The course ends with a review at how the Frontend Designer constructs
default presentations for Meta4Objects. You will identify the structure of a
default presentation, and enumerate the different controls used in such
presentations.
Understanding the structure and functionality of each of the elements that
appear in a default presentations will prove to be very useful, because you
will be able to use the Frontend Designer Wizard to quickly generate
default presentations for your Meta4Objects, and modify them according to
your needs.
Introduction
Lesson objectives
Upon completion of this lesson, you will be able to:
n Understand the structure of a default presentations created with
the Frontend Wizard.
n Identify each of the elements used in a presentation created with
the wizard, and their role in the presentation.
n Alter presentations created with the wizard and customize them
according to your needs.
Lesson 1.
Introducing the Frontend
Designer:Basic concepts
Lesson 4.
Connecting to
Meta4Objects
Lesson 5.
Exploring what the FED
Wizard does
Lesson 3.
Advanced functionality
Lesson 2.
Building logic into
presentations: more
OBL
172
How to access the functionality for this lesson
Select the following path:
If you select this path the following window opens:
Click the Frontend Designer option on the right panel, or double click the
same option on the tree and the Frontend Designer window will open.
Meta4Mind Menu Tree
Mind|Developement Tools|Presentations
Figure 8. Accessing the Frontend Designer
Exploring what the Frontend Designer Wizard does 173
Remember to show the Presentation Browser on the screen. To open it
select the option View|Presentation Browser on the menu bar.
Figure 9. The Frontend Designer window
174
You have already used the Frontend Wizard in your Meta4Objects course
for generating default presentations for your Meta4Objects.
Now that you have been trough the main elements of the designer tool you
will understand what a default presentation is about. This becomes an
important point as a great amount of work can be saved if you use the
wizard, but commonly changes to the default presentation are required.
Those changes are easily achieved if you have a deep understanding both of
the designer tool and of what a default presentation is.
Run the wizard and select the Meta4Object we have been working with
(CMP_M40_COSTS3). Generate its default presentation (WARNING: do
not save THIS default presentation).
Main structure
By default, the main presentations form is structured as follows:
A tree is usually added into splFormLeft reproducing the Meta4Objects
nodes hierarchy.
SplNodeFields_Up
splFormRight/splNodeDown/splNodeFields_Up act as containers for the
controls that will display the data of different nodes. A changer is also used.
Conceptual definitions
Figure 10. Structure of a default presentation
Exploring what the Frontend Designer Wizard does 175
Usually this changer contains two tabstrips:
TABSTRIP_ROOTS is reserved for the Root Node of the involved
Meta4Object. Non root nodes will be represented in the other tabstrip
control. The name of this non root tabstrip is taken from the root node. In
our example COURSES.
Generally speaking, each level in the underlying Meta4Object is assigned a
Tabstrip, whose name is TABSTRIP_ParentNodeId. Each sibling in a
specific level is represented by a tab in the corresponding Tabstrip. The
name of the tab for each sibling is TAB_NameOfTheNode.
The specific structure of each tab is the same. The following figure shows
the displayed Explorer area for the root and non root tabs (left side) and the
design of both tabs (right side).
Toolbars, Patterns and Nodestatus controls play the roles you have
Figure 11. SplNodeFields_Up
Figure 12. chaChangerNodes
Figure 13. Mapping the visual area with the explorer structure
176
already dealt with. The NODE_COURSES and NODE_COSTS controls
are Mimic controls (see Lesson 5) whose class type is initially set to
Scrollpanel. The mimic class is changed by means of the first button in
tlbCOSTS and tlbCOURSES. The following figures show the controls
inside each of the mimics in our example.
Primary key related objects are inserted into a groupbox control. In case the
wizard finds a relation in the dictionary it builds a ZLG, inserting the
elements that were discussed in Lesson 5. You can see a Listgroup control
in NODE_COURSES.
Figure 14. Controls inside the mimic controls I
Figure 15. Controls inside the mimic controls II
Exploring what the Frontend Designer Wizard does 177
SplNode_Up
This block contains the controls shown in the following figure.
Inside scrPath scrollpanel two controls are inserted:
a. panTrackSection, which is a panel, where a connection with the track
Meta4Object is implemented. The figure below shows the design of
this panel.
The panTrackSection control has its Constructif property set to 4, which
means that only in case a 1:N connection has been actually established is
this object constructed (See Lesson 5).
Figure 16. SplNode_Up
Figure 17. panTrackSection
178
b. chaChangerPath, which is a changer control. It contains the
navigation buttons for the root node. We will see later on how this
changer is controlled in run time. Design is displayed in the figure
below..
SplNodeFields_Down
Finally the lower area of the form is dedicated to this block. In run time it is
controlled so as to show a link to child nodes when parent nodes are being
displayed. The figure below shows the Explorer area of this block (left
side) and the block in run time (right side).
Figure 18. chaChangerPath
Figure 19. splNodeFields_Down
Exploring what the Frontend Designer Wizard does 179
Logic in Default Presentations
You can control which node is going to be displayed in run time in a default
presentation from different controls.
The Tree as a main controller
Inside each tree node the wizard inserts an Evclick event. A number of
actions are executed inside this event.
First the changer containing the nodes tabstrips is changed to the level
representing the node (you are dealing with the objects contained in
SplNodeFields_Up. See Lesson 5). This is done by means of Changeto
method.
The following action makes use of Selectedtab method in order to show
the corresponding tab. In our example tabstrips have only one tab, but in
case a number of nodes reside at the same level, each would be represented
in one of the tabs of that levels tabstrip.
These actions depend on the relative order, that is the sequence. A tab
cannot be selected before its changer has constructed the container Tabstrip.
The third action works over the changer in SplNode_Up. It will show the
parent navigation buttons in case the child is visible, or it will be set to
"NOTHING" in case the root node is displayed. This is also achieved with
the Changeto method.
Finally SplNodeFields_Down changer is changed to the level containing
the links to the levels shown in figure 16.
Figure 20. Events and actions in the tree
chaChangerNodes.Changeto(TABSTRIP_ROOTS)
TABSTRIP_ROOTS.Selectedtab(TAB_COURSES)
chaChangerPath.Changeto("NOTHING")
scrChildNodesLink/chaChildNodesLink.Changeto(PIE_COURSES)
chaChangerNodes.Changeto(TABSTRIP_COURSES)
TABSTRIP_COURSES.Selectedtab(TAB_COSTS)
chaChangerPath.Changeto(PAT_COURSES)
scrChildNodesLink/chaChildNodesLink.Changeto(PIE_COSTS)
180
Tabs
In case more than one node is present at the same level tabs include an
Evclick event with:
a. An Action_call for changing the chaChangerPath.
b. An Action_call for changing the child related footer.
Notice that no changes between hierarchical levels take place in the tabs
Evclick. Only changes in the same level are defined here.
Footer section (SplNodeFields_Down)
In case it is displayed a number of links to the child node appear (see figure
16). Each link contains again an Evclick that reproduces the behavior of
child nodes in the tree, i.e.
a. chaChangerNodes.Changeto(TABSTRIP_.......)
b. TABSTRIP_COURSES.Selectedtab(TAB_....)
c. chaChangerPath.Changeto(PAT_COURSES)
d. chaChildNodesLink.Changeto(PIE_.....)
Exploring what the Frontend Designer Wizard does 181
Multicompany in default presentations
By default, selecting the Multicompany checkbox automatically generates
an entry for the menu and creates the corresponding buttons in the toolbar.
Internally the multicompany feature depends on the company ID itself,
which is used to filter by company..
Note that these controls do not have any visible eventclk controls
associated.
Figure 21. Components that correspond to different features of a
presentation that is multicompany enabled.
182
Lesson key points...
n Generating default presentations automatically includes components
that define the panels, tabstrips, tabs, tree structure, nodes, and
navigational keys.
n Additionally you can optionally add multicompany features to a default
presentation.
You should be able to...
Lesson summary
Match the different parts of a presentation to the corresponding
components in the presentation browser.
183
Appendix: Brief summary of
some controls
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
184
Controls for containers
n Button
n Evclick
n Groupbox
n Calendar
n Checkgroupbox
n Dataevents
n Event
n Exeblocks
n Frmobject
n Ganttable
n Link button
n Listgroup
n Mimic
n Nodehistory
n Panel
n Scrollfrmobject
n Scrollpanel
n Setpos
n Shortcut
n Slider_dates
n Table
n Template
n Textbox
n Evdbclick
n Evvalidate
n Treeview
n Treenode
n Evclick
n Treenode
n Rectree
n Rectreenode
n Action_set
n Evclick
n Evdbclick
n Evdrag
n Evdrop
n Popupmenu
n Rectreenode
n Itemlabel
n Nodestatus
185
n Tabstrip
n Tab
n Calendar
n Checkboxgroup
n Dataevents
n Evclick
n Event
n Exeblocks
n Frmobject
n Ganttable
n Link Button
n Listgroup
n Mimic
n Nodehistory
n Panel
n Scrollfrmobject
n Scrollpanel
n Setpos
n Shortcut
n Slider_dates
n Table
n Template
n Image
n Changer
n Calendar
n Checkboxgroup
n Dataevents
n Event
n Exeblocks
n Frmobject
n Ganttable
n Link Button
n Listgroup
n Mimic
n Nodehistory
n Panel
n Scrollfrmobject
n Scrollpanel
n Setpos
n Shortcut
n Slider_dates
n Table
n Template
n Link
n Patternbox
n Combobox
n Evclick and Evvalidate
n Urlbox
n Toolbar
n Toolbarbutton
n Evclick
n Evclickpressed
n Popupmenu
n Unpressed
186
n Splittvertical
n Splittblock
n Calendar
n Checkboxgroup
n Dataevents
n Event
n Evhide
n Evshow
n Exeblocks
n Frmobject
n Ganttable
n Link Button
n Listgroup
n Mimic
n Nodehistory
n Panel
n Scrollfrmobject
n Scrollpanel
n Setpos
n Shortcut
n Slider_dates
n Table
n Template
n Extern
n Slider
n Evvalidate
n Label
n Evclick
n Presentation
n Action_bp
n Action_call
n Action_cmf
n Action_copy
n Action_dataprops
n Action_datatrack
n Action_dialog
n Action_edititem
n Action_execute
n Action_filter
n Action_goto
n Action_help
n Action_list
n Action_listtrack
n Action_message
n Action_method
n Action_notify
n Action_options
n Action_preload
n Action_script
n Action_set
n Action_task
n Action_tasklet
n Action_value
n Extends
187
n Forms
n Backgroundimage
n Button
n Calendar
n Changer
n Checkbox
n Checkboxgroup
n Combobox
n Dataevents
n Date
n Evload
n Evshow
n Evunload
n Exeblocks
n Extern
n Ganttable
n Groupbox
n Image
n Itemlabel
n Label
n Link
n Listgroup
n Menubar
n Mimic
n Nodehistory
n Nodestatus
n Panel
n Patternbox
n Rectree
n Scrollpanel
n Shortcut
n Slider
n Slider_dates
n Splitthorizontal
n Splittvertical
n Forms (condt)
n Table
n Tabstrip
n Textarea
n Textbox
n Toolbar
n Treeview
n Urlbox
188
189
Appendix: Mouse events
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
190
Mouse events
n Evclick
n Menu
n Menuitem
n Button
n Label
n Itemlabel
n Textbox
n Image
n Extern
n Patternbox
n Mimic
n Shortcut
n Tab
n Toolbarbutton
n Treenode
n Rectreenode
n Evclickchecked & Evclickunchecked
n Menu
n Menuitem
n Extern
n Mimic
n Evclickpressed & Evclickunpressed
n Extern
n Mimic
n Toolbarbutton
n Evdbclick
n Textbox
n Combobox
n Image
n Extern
n Calendar
n Date
n Mimic
n Textarea
n Column
n Rectreenode
n Evdrag & Evdrop
n Rectreenode
n Extern
n Mimic
191
Appendix: Evvalidate:
Triggering mechanisms
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
192
n Extern
n Mimic
n Date
n Dataevents
Triggered when losing focus
n Textbox
n Column
n Textarea
n Calendar
n Combobox
Triggered when clicking
n Checkbox
n Optionbutton
n Slider
Evvalidate
193
Appendix: Data-related events
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
194
n Evaftermove
n Dataevents
n Extern
n Mimic
n Evafternew
n Dataevents
n Extern
n Mimic
n Evafterdelete
n Dataevents
n Extern
n Mimic
n Evafterpersist
n Dataevents
n Extern
n Mimic
n Evafterchangeitem
n Dataevents
n Extern
n Mimic
Data-related events
195
Appendix V: Other events
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
196
Other events
n Evnotify
n Action_task
n Action_tasklet
n Evload
n Form
n Tab
n Changer
n Evunload
n Form
n Evshow
n Form
n Splittblock
n Extern
n Mimic
n Evhide
n Extern
n Mimic
n Evtab
n Extern
n Mimic
n Table
n Evbefnav
n Urlbox
n Rectreenode
n Extern
n Mimic
n Evnavcom
n Urlbox
n Rectreenode
n Extern
n Mimic
n Evoledrop
n Rectreenode
n Extern
n Mimic
n Evoledrag
n Rectreenode
n Extern
n Mimic
197
Appendix VI: Some properties
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
198
Properties set #1
Comments on Grants:
n Bit Mask
Properties
Name Meaning Run time Mandatory
Classname Name of the class by
which the component is
represented
N Y
Alias Logical name given to the
component
N Y
Idchannel ID of the Meta4Object
linked to the component
N N
Idnode ID of the node linked to
the component
N N
Iditem ID of the item linked to
the component
N N
Idchannelkey Advanced use. Password
for the Meta4Object
access
N N
Idchannelalias Advanced use. Logical
name given to the
Meta4Object
N N
Idaccessalias Advanced use. Name
given to the Meta4Object
access
N N
Grants Bit map reflecting
permissions
N Y
Grant Mask number Binary code
Read 1 00001
New 2 00010
Update 4 00100
Delete 8 01000
Execute 16 10000
199
n Default value: 31(all)
Properties set #2
Properties set #3
Name Meaning Default Mandatory
Font Type of font MS Sans
Serif
Y
Backcolor Background color (in
some components)
Gray Y
Forecolor Foreground color (in some
components)
Black Y
Borderstyle Border (in some
components)
Single
Fixed
Y
Alignment For text inside the
component (Left/
Centered/Right=0/2/1)
0 Y
Name Meaning Default Mandatory
Top Referred to the container
component. Vertical
distance
Visual D. Y
Left Referred to the container
component. Left distance
Visual D. Y
Width Width of the component Visual D. Y
Height Height of the component Visual D. Y
Align Referred to the container
component. Type of
alignment
Null Y
200
Comments on Align. Possible values:
Properties set #4
Top Stuck to the top of the container. The
component changes its width to the
containers. The component keeps its
height.
Bottom Stuck to the bottom of the container.
The component changes its width to
the containers. The component keeps
its height.
Left Stuck to the left of the container. The
component keeps its width. The
component changes its height to the
containers.
Right Stuck to the right of the container. The
component keeps its width. The
component changes its height to the
containers.
Bottomfixed Stuck to the bottom of the container.
The component changes its width to
the containers. The height of the
component changes according to the
components Top value
Rightfixed Stuck to the right of the container. The
component changes its width
according to its Left value. The
component keeps its height.
All Adjust to the containers size.
Name Meaning Default Mandatory
Enabled The component is enabled.
(Enabled/Disabled = 1/0)
1 Y
Visible The component is visible.
(Visible/Not visible) = 1/0
1 Y
Editable The component contains a
text which is editable (1)
or not editable (0)
1 Y
201
Properties set #5
Some more properties
Action
n Values
n Addfilters
n Copy
n Cut
n Delete
n Execute
n Executewithoutparams
n Filters
n Find
n First
n Firstdoc
n Last
n Lastdoc
n Load
n New
n Next
n Nextdoc
n Paste
n Previousdoc
n Redo
n Reload
n Removefilters
n Save
n Undo
n Unload
Name Meaning Default
Text Text appearing in run time. Admits
multi language values
Same as Alias
202
Mousecursor
n Image of the mouse cursor when passing over the component.
n Values:
n Arrow
n Arrowhourglass
n Arrowquestion
n Crosshair
n Default
n Hand
n Hourglass
n Ibeam
n Iconpointer
n Nodrop
n Sizeall
n Sizenesw
n Sizepointer
n Sizewe
n Uparrow
Image
n An image stored in the disk can be used by a control with the Image
property. In that case values can be given to this control according with
the reference of the Image Folder.
n A number of images are available. Their values are:
n #Calculator
n #Calendar
n #Chnfinal
n #Chnint
n #Chnmedium
n #Closebook
n #Delrecord
n #Erasefilter
n #Execute
n #Forbbiden
203
n #Forbbiden_1
n #Forbbiden_2
n #Four
n #Gofirst
n #Golast
n #Gonext
n #Goprevious
n #Menu
n #Newrecord
n #Openedbluebook
n #Openedredbook
n #Save
n #Search
n #Showfilter
n #Showlist
n #Sort
n #Statusdeleted
n #Statusdeleted1
n #Statusdeleted2
n #Statuseof
n #Statuseof1
n #Statuseof2
n #Statusmodified
n #Statusmodified1
n #Statusmodified2
n #Statusnew
n #Statusnew1
n #Statusnew2
n #Statusnormal1
n #Statusnormal2
n #Undo
204
205
Appendix VII: Events
contained in components
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
206
Events
Component Event
Presentation Presentation
Form Evshow
Evload
Evunload
Tab Evclick
Evload
Action_task Evnotify
Action_tasklet Evnotify
Label Evclick
Button Evclick
Textbox Evvalidate
Evdbclick
Evclick
Splittblock Evshow
Evhide
Changer Evload
Checkbox Evvalidate
Combobox Evvalidate
Evdbclick
Extern See figure bellow
Image Evdbclick
Evclick
Patternbox Evclick
207
Toolbarbutton Evclick
Evclickpressed
Evclickunpressed
Urlbox Evbefnav
Evnavcom
Slider Evvalidate
Calendar Evvalidate
Evdbclick
Treenode Evclick
Rectreenode See figure bellow
Date Evvalidate
Evdbclick
Dataevents Evvalidate
Evaftermove
Evafternew
Evafterdelete
Evafterpersist
Evafterchangeitem
Evbeforepersist
Menu Evclick
Evclickchecked
Evclickunchecked
Menuitem Evclick
Evclickchecked
Evclcickunchecked
Mimic See figure bellow
Shortcut Evclick
Slider_dates Evchange
Table Evtab
Component Event
208
Column Evvalidate
Evdbclick
Textarea Evvalidate
Evdbclick
Figure 22. Events for the Extern component
Component Event
209
Figure 23. Events for the Rectreenode component
210
211
Appendix VIII: Methods
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
212
Methods
Component Method
Button Enabled
Text
Visible
Calendar Backcolor
Copy
Cut
Enabled
Forecolor
Paste
Text
Visible
Changer Changeto
Checkbox Backcolor
Copy
Cut
Enabled
Forecolor
Paste
Value
Visible
213
Column Backcolor
Copy
Cut
Enabled
Forecolor
Paste
Text
Visible
Combobox Backcolor
Copy
Cut
Enabled
Forecolor
Paste
Text
Visible
Exeblocks Call
Form Print
Unload
Validate
Validateform
Image Image
Itemlabel Backcolor
Enabled
Forecolor
Text
Visible
Component Method
214
Menu Checked
Click
Enabled
Visible
Menuitem Enabled
Visible
Checked
Mimic Class
Popupmenu Show
Rectreenode Condition
Checkcurrentpos
Shortcut Click
Slider Backcolor
Enabled
Forecolor
Value
Visible
Splittblock Floating
Blocked
Textarea Backcolor
Copy
Cut
Enabled
Forecolor
Paste
Text
Visible
Component Method
215
Textbox Backcolor
Copy
Cut
Enabled
Forecolor
Paste
Text
Visible
Toolbarbutton Click
Enabled
Pressed
Text
Visible
Urlbox Goback
Goforward
Gohome
Refresh
Stop
Url
Component Method
216
217
Appendix IX: Some more
components
The purpose of this appendix is to introduce other information which can be
relevant for the understanding of the current course.
About this appendix
218
Action_copy
Action_dataprops
Some more components
Property name Values
Set #1 See Appendix I
Action Cut
Copy
Paste
Undo
Property name Values
Set #1 See Appendix I
Mappersist
Mapload
*
Mapundo
Mapdelete
Autoload
0/1
Load
True/False
Unload
**
True/False
Reload
Statistics
Workdates
Action Addfilter,Copy, Copydata, Cut,
Cutdata, Delete, Execute,
Executewithoutparams, Filters, Find,
First, Firstdoc, Last, Lastdoc, List,
Load, New, Next, Nextdoc, Paste,
Pastedata, Previous,
PreviousdocRedo, Removefilters,
Save, Silentsave, Undo, Unload
219
Actionifinvalidpos Addfilter,Copy, Copydata, Cut,
Cutdata, Delete, Execute,
Executewithoutparams, Filters, Find,
First, Firstdoc, Last, Lastdoc, List,
Load, New, Next, Nextdoc, Paste,
Pastedata, Previous,
PreviousdocRedo, Removefilters,
Save, Silentsave, Undo, Unload
Actionifvalidpos Addfilter,Copy, Copydata, Cut,
Cutdata, Delete, Execute,
Executewithoutparams, Filters, Find,
First, Firstdoc, Last, Lastdoc, List,
Load, New, Next, Nextdoc, Paste,
Pastedata, Previous,
PreviousdocRedo, Removefilters,
Save, Silentsave, Undo, Unload
Mvcaction
*. Maps the Load action with the item execution
. Assigns this property to the Meta4Object
. Loads the Meta4Object
**. Unloads the Meta4Object
Property name Values
220
Action_datatrack
Action_execute
Propert name Values
Set #1 See Appendix I
Idtrackchannel
Idtrackchannelalias
Idtrachchannelkey
Idtrackaccessalias
Idtracknode
Idtrackitem
Trackgrants
Idtrackpresentation
Property name Values
Set #1 See Appendix I
Action
*
*. Name of actions that can be executed
Globalrefresh
Channelrefresh
Accessrefresh
Branchrefresh
Noderefresh
Recordrefresh
Itemrefresh
Validate Boolean
221
Action_method
Action_method enables the execution of a given method defined in a
Meta4Object with the possibility of transferring values in both directions
Property name Values
Set #1 See Appendix I
Sourceargs
Sourceobjs
Targetobjs
Returnobjs
Ontrue
Onfalse
Onerror
222
ccxxiii
Index
A
Absolute reference facility 68
Absolute referencing 66
Action_bp 127
Action_call 73
Action_dataprops 123
Action_dialog 94
Action_goto 91
Action_list 117
Action_method 125
Action_preload 104
Action_script 131
Action_set 72
Action_task 74
Action_value 116
Adding controls from the control palette to a
form 23
Adding controls to a form from the "Insert
Component" option 25
Adding visual and non visual components with
the explorer 40
Advanced properties of the ZLG 148
Askbeforeclose property 91
Availablesteps property 104
C
Changing properties in run time 72
Changing the grid size 20
Closing the OBL editor 21
Conditional object construction 163
Connecting presentations 74
Constructif 164
Control Button 34
Control Changer 85
Control Checkbox 33, 132
Control Checkboxgroup 34
Control Combobox 32
Control Groupbox 33
Control Image 31
Control Label 30
Control Link 32
Control Mimic 128
Control palette 23
Control Panel 84
Control Scrollpanel 84
Control Slider 35
Control Split 57
Control Tabstrip 84
Control Textbox 34
Control Urlbox 32
D
Data properties 102
E
Editing the OBL code of a presentation 20
Exeblocks 94
Extends 74
F
Flow control 91
ccxxiv
Index
Frontend Designer interface 16
Function Clear 144
Function List 145
Function Zoom 144
G
General properties of Listgroup 139
Grant property 91
I
Inserting a new form in a presentation 18
L
Linking presentations to Meta4Objects 102
Listgroup 134
Loading options 103
Logic behind Default Presentations 179
M
Mainargs and Mainobjs 140
Menus 58
Modal property 90
Multi language 109
Multi language text 89
N
New Presentation 17
Nodestatus 118
O
Onok, Oncancel properties 91
P
Patternbox 118
Presentation context and context variables 75
Presentation Explorer 40
Previewing a presentation 18
R
Referring to properties of other objects 66
Registername property 90
Relative referencing 67
RunTime variables 77
S
Saving a presentation 25
Saving code from the FrontEnd Designer and
inserting code into the OBL editor 38
Setting properties in design time using the
OBL editor 35
Setting properties in design time using the
Properties dialog box 27
Specific patterns 159
SplNode_Up 177
SplNodeFields_Down 178
SplNodeFields_Up 174
Startupposition property 90
Steps in the preload 161
Structure of the Listgroup control 137
T
Table 119
Targetitems and Targetobjs 142
The Function control 137
The Properties dialog box 47
The Record Insert Wizard 112
The Record Insert Wizard and the ZLG 151
The syntax checker 36
Toolbar groups 122
Toolbar Navigation Groups 158
Toolbars 57
Trees 85
V
Virtual forms 85
ccxxv
Index
W
Windowstate property 90
Working with tracks 154