4.10.2.6. Tablehandler: GUI

4.10.2.6.1. introduction

In the following sections we discover the TableHandler GUI.

Let’s see this image:

../../../_images/gui16.png
  • The Tablehandler view class and form class take place into the central pane (point 2)
  • Points 1, 3 and 4 belong to the FrameIndex component

The combination of a TableHandler in a project with the frameindex component is a good solution for having a quick pre-defined gui.

However, in this page we’ll talk about the view class and form class GUI, that is, the central pane (point 2). For more information on points 1, 3 and 4, please check the FrameIndex page.

4.10.2.6.2. view-data window

The view-data window is the GUI of the TableHandler’s View class.

It allows to:

  • visualize the records saved by the user
  • make a query to search into records

Let’s see this image:

../../../_images/gui_view16.png

The view window has been divided through some colored box; in particular you can see:

In the next sub sections we explain in all the details these parts.

4.10.2.6.2.1. top bar

../../../_images/gui_view_topbar16.png

The top bar contains:

  1. the windowTitle() method
  2. the workdate

4.10.2.6.2.2. action bar

../../../_images/view_actionbar6.png

The action bar allow to perform many actions. In particular you can find:

4.10.2.6.2.2.2. query operator box

../../../_images/query_operator_box16.png

The query operator allow to select the SQL operator through which there will be made the query.

In the left box you can specify the “NOT” operator.

In the right box user can choose between:

  • contains: look for columns that contains the characters typed from user (case insensitive)
  • starts with: look for columns that starts with the characters typed from user (case insensitive)
  • equal to: look for columns that match entirely with the characters typed from user (case sensitive)
  • word start: look for columns that contains a word that starts with the characters typed from user (case insensitive)
  • starts with chars: look for columns that starts with the characters typed from user (case sensitive)
  • is null: look for null columns
  • is null or empty: look for null or empty columns
  • in: TODO
  • regular expression: add a regexp
  • greater than: look for columns that contains a greater number respect to a number typed from user (works for numerical columns)
  • greater or equal to: look for columns that contains a greater or equal number respect to a number typed from user (works for numerical columns)
  • less than: look for columns that contains a smaller number respect to a number typed from user (works for numerical columns)
  • less or equal to: look for columns that contains a smaller or equal number respect to a number typed from user (works for numerical columns)
  • between: look for columns that contains a number contained between two numbers typed from user (works for numerical columns). The two numbers must be written separated by a comma, like value1,value2

4.10.2.6.2.2.3. query value box

../../../_images/query_value16.png

In the query value user can specify the value for the SQL query

4.10.2.6.2.2.4. run query button

../../../_images/run6.png

The run query button allows to start the query. To start a query, you can otherwise press “ENTER”

4.10.2.6.2.2.5. query action buttons

You find here some buttons that allow user to perform different actions. You can modify the preset of buttons following the instructions of the TODO section

In particular, user finds the following buttons:

../../../_images/lens6.png

Query tool: allow to perform more complex queries and save them

../../../_images/excel6.png

Export: export the result of the query in an excel file

../../../_images/print6.png

Print: print the result of the query

../../../_images/batches4.png

Batch: allow to start an action batch

../../../_images/mail6.png

Mail: TODO (not working yet)

4.10.2.6.2.2.6. query result numbers

../../../_images/numbers6.png

This icon shows the numbers of records that match with the query (the number with the blue background) respect to the total number of records (the number with the yellow background)

4.10.2.6.2.2.7. add and delete buttons

../../../_images/add_delete6.png

The delete button allow to permanently cancel some records. User must select the records he want to cancel before clicking this button. The add button allow to add a new record. The gui for the creation of a new record is described in the data-entry window

Note

to use the delete and the add buttons, user must have the right permits. For more information about the permits, check the <authentication> section of the instanceconfig page

4.10.2.6.2.2.8. lock button

../../../_images/locker6.png

The lock button allow to unlock the add and delete buttons, in order to delete, modify or create new records

4.10.2.6.2.3. central pane

The central pane contains all the stuff you define in the View class.

Usual the central pane is used to visualize a grid with the records saved in the database:

../../../_images/columns_view16.png

The columns pane allows user to see all that records that satisfy his SQL query. Every record show the columns you have inserted in the th_struct method.

Through the configurable-views bar (opened through the button “1” in the figure) user can create more than one preset views

4.10.2.6.2.3.1. configurable-views bar

../../../_images/conf_views6.png

The “configurable-views bar” allows the user to create views.

In the image, “id”, “Code”, “Description”, “Full Descr.”, “Product Type” and “Products Type” are the name of the columns of the database table.

In particular, “Products Type” is colored in green because it is a relation column

.

Let’s see all the buttons:

../../../_images/base6.png

Change from “Base view” to a custom view (the button will change its label when you select another view)

../../../_images/favorite6.png

Favorite view: Select the current view as the favorite view

../../../_images/save6.png

Save view: Save a custom view

../../../_images/delete6.png

Delete view: Delete a custom view (you can’t delete the “Base View”)

4.10.2.6.2.4. bottom bar

../../../_images/bottom_bar16.png

The bottom bar is used by default to send message to user (like ... TODO).

You can customize it ... TODO

4.10.2.6.3. data-entry window

The data-entry window is the GUI of the TableHandler’s Form class.

It allows to:

  • modify, add or delete a single records (user must authenticate himself with the right permits to perform these actions - check the authorizations page for more information)

Let’s see this image:

../../../_images/gui_form16.png

The form window has been divided through some colored box; in particular you can see:

In the next sub sections we explain in all the details these parts.

4.10.2.6.3.1. top bar

../../../_images/gui_view_topbar16.png

The top bar contains:

  1. the title of the record (you can customize the title. Check here TODO for more infomation)
  2. the workdate

4.10.2.6.3.2. action bar

../../../_images/form_actionbar6.png

The action bar contains:

../../../_images/dismiss6.png

Dismiss button: return to the view

../../../_images/revert6.png

Revert button: revert the changes after the last save

../../../_images/save6.png

Save button: save the record

../../../_images/locker6.png

Locker: lock/unlock all the action bar buttons

../../../_images/add_delete6.png

Add/Delete buttons: add a new record / delete current record

../../../_images/navigation6.png

Navigation buttons: Allow to move from a record to another one

Semaphore: it indicates the save status; in particular:

../../../_images/green6.png

green light: the record is saved

../../../_images/yellow6.png

yellow light: the record has unsaved changes

../../../_images/red6.png

red light: some condition for a correct save is not satisfied (for example, a validation is not satisfied); correct the wrong field in order to save the record

../../../_images/gray5.png

gray light: there are no record saved (visible only with the stackTableHandler)

4.10.2.6.3.3. form pane

In the form pane you can find all the stuff defined in the Form class.

In particular, you can define a form through which user can save its new records (or modify the existing ones), joined to some webpage elements or any other stuff.

Let’s see this image:

../../../_images/form_box16.png

The image is an example of a simple form with a TabContainer including in the first tab a formbuilder

4.10.2.6.3.4. bottom bar

../../../_images/bottom_bar16.png

The bottom bar is used by default to send message to user (like the correct act of a record save).

You can customize it ... TODO