ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / RAD / RAD pattern
  • The steps for creating a RAD pattern
  • Which pages must be created?
  • The files to create
  • Standard to follow
  • The Vision Plus pages
  • Overview
  • Creating the Vision Plus page
  • Creating the necessary elements in the form page
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Creating the Vision pages of the WEBDEV RAD pattern
The steps for creating a RAD pattern
The different steps for creating a WEBDEV RAD pattern are as follows:
  1. Creating the "RAD Pattern" project.
  2. Creating the different pages of the pattern.
  3. Generating the RAD pattern.
  4. Using the RAD pattern.
Which pages must be created?

The files to create

Reminder: To build a RAD pattern used to create a full project, the following files are required:
  • A form for RADFileA.
  • A form for RADFileB. A Vision Plus button (or a popup combo box) must allow you to select an element of RADFileA.
  • A form for RADFileC. A Vision Plus button (or a popup combo box) must allow you to select an element of RADFileB.
  • A table for RADFileA.
  • A table for RADFileB.
  • A table for RADFileC.
  • A RADFileB/RADFileD relation page.
The main menu of the site can be included in the template associated with the pages.

Standard to follow

This help page presents the rules that apply when creating the pages of the RAD Pattern. These rules have been used to create the different patterns supplied with WEBDEV 16.
These rules are recommendations. You can implement and use your own standard.
The Vision Plus pages

Overview

The Vision Plus pages are used to:
  • select an element of RADFileA from a form on RADFileB.
  • select an element of RADFileB from a form on RADFileC.
Example: Selecting a customer from an order.
The following elements allow you to use a vision plus page:
  • in the form page: a combo box and a button.
  • a Vision Plus page. This page can be displayed by the button as a dialog box for example. This case is presented in this help page.

Creating the Vision Plus page

The Vision Plus page contains:
  • a table.
  • a Validate button (to validate the selection of the element) and a Cancel button.
To create a Vision Plus page:
  1. Click in the quick access buttons.
    • The creation window appears: click "Page" then "Page".
    • In the wizard that starts, select "Blank" and validate.
  2. In the description window, enter the name of the page. This name must necessarily contain the name of the file displayed in the table (some examples: PAGE_Vision_RADFileA, PAGE_Visio_RADFileA, ...).
    Remark: If you want to indicate the name of the current file to the user, use the name of the file (RADFileA for example) in a caption. The RADFileX term will be automatically replaced by the caption of the file described in the analysis.
  3. Save the page.
  4. Create a Table control in the page: on the "Creation" tab, in the "Data" group, expand "Table" and select "Table".
  5. In the table creation wizard, specify the following characteristics:
    • Select "Display the data from a file or from a query".
    • Select the base file of the table (RADFileA for example).
    • Keep the proposed item as well as the search item.
    • Validate the name of the table.
  6. Position the Table control in the page and define its size.
  7. Create and position the different buttons of your page: Validate and Cancel.
  8. Case of the Validate button.
    This button will be used to validate the selection in the table. The code of the Validate button is as follows:
    // Close the page with True in return value
    PageCloseDialog(True)

    Remark: the page is displayed as a dialog box (PageDisplayDialog). The True value can be returned to the calling page.
  9. Case of Cancel button
    This button is used to cancel the selection.
    // Close the page with False in return value
    PageCloseDialog(False)
  10. Initialization code of page
    // Position on the current record
    TableDisplay(TABLE_RADFileB, taCurrentFirst)

    // Default return value
    MyPage..ReturnedValue = False

Creating the necessary elements in the form page

The Vision Plus pages can be used from the following pages:
  • Form on RADFileB
  • Form on RADFileC
A combo box and a button must be created in these pages. These elements can be stacked over the supercontrol corresponding to the form.
To create the combo box:
  1. On the "Creation" tab, in the "Usual controls" group, click "Combo box" and click the page.
  2. In the combo box creation wizard, select the following options:
    • "Display the data coming from a file or from a query".
    • Data file: RADFileA for a form on RADFileB, RADFileB for a form on RADFileC.
    • Keep the default options. The stored item must be the identifier of the file.
    • The combo box is linked to no item.
    • the name of the control is "COMBO_IDRADFileX" (COMBO_ is the prefix defined in the code style: it is not required if no code style is used). For example, for the RADFileB form, the combo box will be named COMBO_IDRADFileA.
  3. Validate. The Combo Box control is created.
To create the button:
  1. On the "Creation" tab, in the "Usual controls" group, click and click the page.
  2. In the control description window, specify the name of the button. This control has a name in the following format: "BTN_VISION_RADFileX" (BTN_ is the prefix defined in the code style: it is not required if no code style is used). For example, for the RADFileB form, the button will be named BTN_VISION_RADFileA.
  3. The click code of the button is as follows:
    // Open the vision page of RADFileB
    IF PageDisplayDialog(PAGE_Vision_RADFileB) = True THEN
    // Refreshes the content of the RADFileB combo box
    ListDisplay(COMBO_IDRADFileB)
    // Assign and position the combo box
    COMBO_IDRADFileB = RADFileB.IDRADFileB
    END
This code is used to open a a dialog box-like page to select records.
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help