SCREEN LIFECYCLE

Page Init -> Data Load

In this learning context, we will perform data extraction using Page Init during the loading process of a screen. We will then use the action that pulls this data by assigning it to the components in the interface using Data Binding.

Page Init is the section where we add the actions we want to run during the loading process of a screen. This function is especially important for situations where data needs to be displayed on startup. For example, when a personnel list screen is loaded, it may be desired to display the personnel records in this list immediately. In this scenario, an action that pulls the personnel list is determined by using the Add Action option under Page Init and this action is assigned as a data source to the components in the interface with the Data Binding method.

If the screen to be used in Page Init will display the details of a selected record, the key of the record to be displayed must be defined as a screen input. This key creates a starting point for the action that will access the details of that record. Then this action is added to the Page Init section and the data provided by this action is assigned to the interface components with Data Binding.

Let's detail the Page Init process in an example scenario.

Let's build a structure where the personnel are listed on the user list screens in our application.

  1. Click on the + icon next to the Managed DB statement.
  2. Select Select Action from the menu.
  3. Give a name to your action on the screen that opens.
  4. Click the + icon in the Choose Source field and select the Personnel table from the drop-down menu.
  5. Click on the link icon next to the Personnel table.
  6. From the screen that opens, select the Department table that is related to the Personnel table.
  7. Open the Fields tab.
    In addition to the fields that come by default, add the ID column in the Personnel table and name it PersonnelID in the Alias field.
  8. Then add FullName, PersonnelImage, Status, and Title fields.
  9. Add the Id field in the Department table and name it DepartmentID in the Alias field.
  10. Then open the Sort Order tab, and select the Personnel table. Select Create date as a column and select Descending.
  11. Click the Create button and save your action.
  12. Add SelectPersonnel action as Initial Action to the user list screen.

In this process flow, we examined the process of adding Page Init to a list screen.

In the next learning content, we will data bind the Page Init we added to the elements on the screen.

In this learning context, we will perform data extraction using Page Init during the loading process of a screen. We will then use the action that pulls this data by assigning it to the components in the interface using Data Binding.

Page Init is the section where we add the actions we want to run during the loading process of a screen. This function is especially important for situations where data needs to be displayed on startup. For example, when a personnel list screen is loaded, it may be desired to display the personnel records in this list immediately. In this scenario, an action that pulls the personnel list is determined by using the Add Action option under Page Init and this action is assigned as a data source to the components in the interface with the Data Binding method.

If the screen to be used in Page Init will display the details of a selected record, the key of the record to be displayed must be defined as a screen input. This key creates a starting point for the action that will access the details of that record. Then this action is added to the Page Init section and the data provided by this action is assigned to the interface components with Data Binding.

Let's detail the Page Init process in an example scenario.

Let's build a structure where the personnel are listed on the user list screens in our application.

  1. Click on the + icon next to the Managed DB statement.
  2. Select Select Action from the menu.
  3. Give a name to your action on the screen that opens.
  4. Click the + icon in the Choose Source field and select the Personnel table from the drop-down menu.
  5. Click on the link icon next to the Personnel table.
  6. From the screen that opens, select the Department table that is related to the Personnel table.
  7. Open the Fields tab.
    In addition to the fields that come by default, add the ID column in the Personnel table and name it PersonnelID in the Alias field.
  8. Then add FullName, PersonnelImage, Status, and Title fields.
  9. Add the Id field in the Department table and name it DepartmentID in the Alias field.
  10. Then open the Sort Order tab, and select the Personnel table. Select Create date as a column and select Descending.
  11. Click the Create button and save your action.
  12. Add SelectPersonnel action as Initial Action to the user list screen.

In this process flow, we examined the process of adding Page Init to a list screen.

In the next learning content, we will data bind the Page Init we added to the elements on the screen.

Files

Yardımcı kaynaklar

Glossary