How To Fetch Data From Screen Tables

The Tables tab allows you to change the way backend tables are displayed on the frontend screen and their behavior.

Step-by-Step Guide

  1. Generate entities from the Trail file.

  2. Open the entity containing the screen table in the Screen Entity Editor.
  3. Press the Tables Tab and add a new table - select the table on the Screens preview and press the Add button in the Available Tables section.

    Each Screen table has the following attributes:

    • Class Name – the name of the Java class, representing a single record in the table
    • Start Row - the row number of the first record in the table
    • End Row - the row number of the last potential record in the table
    • Name – name of the table
    • Next Screen Action – action key for moving forward in the table records
    • Previous Screen Action – action key for moving backward in the table records
    • Support Terminal Data – return terminal of each field in the table (position on the screen, color, background color, if editable, etc.)
    • Scrollable – determine if it is possible to scroll forward and backward in the table records
    • Table Collector
    • Row Gaps – determine the gaps between each record in the table
    • Screen Count – determine the number of screens in a scrollable table
    • Filter Expression
    • Right to Left – select to reverse the table content in right to left languages
    • Stop Expression – a Spring expression defined to identify the end of the table
    • Service Input – select if the table is part of a service input
    • Service Output – select if the table is part of a service output
  4. Set the table columns - select the table column in the Screens Preview and press the Add button in the Available Columns section.

    Each column has the following attributes:

    • Java Type – the Java Type of the fields in the column (Integer or String)
    • Field Name – the name of the column
    • Key – identifies the Key column in the table - Don't Forget To Set Key Column
    • Selection Field – editable field used to select a record in the table and perform an action on it
    • Main Display Field – determine if the column will be shown in the AngularJs view
    • Start Column – the location on the screen that the table column starts
    • End Column – the location on the screen that the table column ends
    • Editable – if the fields in the column are editable
    • Display Name – the name of the column as it appears in the AngularJS view
    • Sample Value
    • Rows Offset
    • Help Text
    • Column Span
    • Sort Index
    • Attribute
    • Target Entity - the entity to which the table will output
    • Expression - -when selected, this field will be used as a component of a different field
    • Class Name – the name of the Java Class, represents a single record in the table
  5. After the screen table has been defined and the Key column has been set, we can start working with it in our services. Looking at the Entity source code, we can see that a List of records is added to our entity, and each record represents a row in the table identified by the Key column (if the Key column is empty, there is no record)



  6.  Go to /src/main/resources → application.yml and add debug level: 

     logging:
        level:
           org:
               openlegacy: debug
  7. Run the Junit test and check the screens' logs. 


     


  8. Generate Service with relevant Input and our table as output (don't forget to set the Output field as List<YourTableRecord> and define Getter and Setter methods).


  9. Run the Service


Filter by label

There are no items with the selected labels at this time.