ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / RAD / RAD pattern
  • The steps for creating a RAD pattern
  • Creating the different pattern windows
  • The files to create
  • Standard to follow
  • The Table windows
  • Case of print buttons
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 Table windows of the WINDEV RAD pattern
The steps for creating a RAD pattern
The steps for creating a WINDEV RAD pattern are as follows:
  1. Creating the "RAD Pattern" project.
  2. Creating the different pattern windows.
  3. Generating the RAD pattern.
  4. Using the RAD pattern.
Creating the different pattern windows

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 relation window RADFileB/RADFileD.
These different elements must contain link buttons. You also have the ability to provide the main menu of the application.

Standard to follow

This help page presents the different rules that must be applied when creating the pages and windows of the RAD pattern. These rules have been used to create the different patterns provided with WINDEV 2024.
These rules are recommendations. You can implement and use your own standard.
The Table windows
A Table window contains the following elements:
  • A table: This table is a browsing table, with file loaded in memory.
  • Buttons used to perform the main actions: Add, Modify, Delete and Print if necessary.
  • Link buttons used to display the corresponding forms for example.
Example: Table window on RADFileA of the Simple Template pattern:
To create a table window:
  1. Click in the quick access buttons:
    • The new element window appears: click "Window" then "Window".
    • The window creation wizard starts.
    • In the wizard, select "Blank" and validate.
  2. In the description window, enter the following information:
    • The window name. This name must necessarily contain the name of the file displayed in the table (some examples: WIN_Table_RADFileA, WIN_Tab_RADFileA, ...).
    • The window title. If the title must display the name of the file, use the name of the "RADFileXX" file (for example, "RADFileA: Viewing table").
  3. Save the window.
  4. Create a Table control in the window: on the "Creation" tab, in the "Data" group, expand "Table and List Box" and select "Table (Vertical)".
  5. In the table creation wizard, specify the following characteristics:
    • Select "Display the data found in a file or in an existing query".
    • Select the base file of the table (RADFileA for example).
    • Keep the proposed item as well as the search item.
    • Specify the source for the fill operation: "File loaded in memory".
    • Validate the name of the table.
  6. Position the Table control in the window and define its size. The column corresponding to the identifier can be invisible if necessary.
  7. Create and position the different buttons of your window (validation, cancellation, print and browse buttons, ...). These buttons can have any name.
    Caution: if the user is allowed to apply a skin template to the windows created by RAD, you must define the type of button that must be used in the skin template. This information can be defined in the modifier ("Skin template" category).
  8. Case of addition button (New button for example).
    This button can be used to enter a new record in a form window for example. The code of the New button can be:
    // Create a new record
    HReset(RADFileA)
    // Open the form of RADFileA in creation mode
    Open(WIN_Form_RADFileA)
    // Refresh the table
    TableDisplay(TABLE_RADFileA, taCurrentRecord)
  9. Case of modification button (Modify button for example).
    This button can be used to modify a new record in a form window for example. The code of the Modify button can be:
    // Is a row selected?
    IF TableSelect(TABLE_RADFileA) = -1 THEN RETURN
    // Open the form of RADFileA in modification mode
    Open(WIN_Form_RADFileA)
    // Refresh the table
    TableDisplay(TABLE_RADFileA, taCurrentRecord)
  10. Case of deletion button (Delete button for example).
    This button can be used to delete a selected record from the table for example.
    The code of the Delete button can be (for the table on RADFileA):
    // Is a row selected?
    IF TableSelect(TABLE_RADFileA) = -1 THEN RETURN
    //1: &Delete
    //2: Do&n't delete
    SWITCH Dialog("Do you want to delete the record?")
    // &Delete
    CASE 1
    // Delete the RADFileA record from the table
    TableDelete(TABLE_RADFileA)
    // Position on the current record
    TableDisplay(TABLE_RADFileA, taCurrentRecord)
    // Do&n't delete.
    CASE 2
    END

    In the code of the deletion button, we advise you to enable the automatic management of errors ("If Error: ", with the automatic process "Display the error and go back to edit").
  11. Case of closing button (Close button for example).
    This button is used to close the window. To simplify the management of the Close button, you have the ability to use a preset action. We recommend that you use the "Close the window (Cancel)" action.
  12. Add the link buttons if necessary.
  13. Add the Vision Plus buttons if necessary.

Case of print buttons

A RAD pattern can contain buttons used to start a print. The code of these buttons (or the associated preset option) must allow you to start the printing (or the preview) of the report.
The reports must be created in the project of the RAD pattern:
  • The name of these reports must contain RADFileX. For better readability, we recommend that you use "Form" or "Table" in the name of the report to easily identify the type of the report.
  • This name must be used in the code of print button (or in the preset action associated with the button).
CAUTION: There is no need to customize the reports found in your project of the RAD pattern. Indeed, during the generation, only the name of the report will be kept. If the "Print" button is found in a "Form" window, the printed report will be a Form report. If the "Print" button is found in a "Table" window, the printed report will be a Table report.
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 08/30/2023

Send a report | Local help