View source | Discuss this page | Page history | Printable version   

ERP 2.50:Developers Guide/Concepts/AD/Standard Windows

ERP 2.50:Developers Guide




Standard Windows are the windows completely defined in Application Dictionary. They allow to view and edit records in tables.

After defining (or modifying) a standard window, the system must be rebuilt (ant smartbuild). During this process WAD generates automatically the Java, XSQL, HTML and XML code for that window and it is compiled. This means that the complete definition for standard windows is within Application Dictionary without any need of manual developments. This has a number of benefits:

Because of all this, it is a best practice to use standard windows, if possible, rather than manual ones.

Structure: Windows, tabs and fields

The structure for standard windows consists in Windows, Tabs and Fields.


The following sections explain how Windows, Tabs and Fields are defined. They are managed from Application Dictionary || Windows, Tabs, and Fields window.


A complete description for all fields involved in the definition of a window can be found in the Database Model document.

Windows are generated automatically by WAD from their definition in Application Dictionary, all windows have a common layout.


Windows can be added to application menu.


Tabs are included within windows. Each tab is limited to a single Application Dictionary table.

A complete description for all fields involved in the definition of a window can be found in the Database Model document. The following subsections detail some important topics to be taken into account when creating a tab.

Tabs hierarchy

Tabs are shown hierarchically, they are defined in a tree way. This means that a tab can have subtabs (it is the parent tab for them), consequently a tab can also be a child for another one and it is possible to have several tabs at the same level.

This hierarchy is specified using two fields in the tab:

The conjunction of these two values gives the position and hierarchy for each tab. Let's see through an example how the following tab structure could be defined:

 |  |-A11
 |  |-A21
 |  |-A22
 |     |-A221
Tab Sequence number Tab level
A 10 0
A1 20 1
A11 30 2
A2 40 1
A21 50 2
A22 60 2
A221 70 3
A3 80 1

When creating subtabs, it is necessary to set which column in the parent column is going to be the master for the subtab. In order to show in the subtabs only the records that are linked to the current record in the parent one.

For example let's suppose tab A is a tab for C_Invoice table and tab A1 is for C_InvoiceLine, in this case C_Invoice.C_Invoice_ID in tab A must be the master column for tab A1, showing in A1 only the records linking to the selected record in A.

There are three possible ways of setting which is the master column in the parent tab:

  1. Using the AD_Column.IsParent check in the table used in the subtab. When a table in a tab contains columns checked as Link to Parent Column, it is looked in the parent tab a column with the same name and if found that one will be the master.
  2. By name. In case the table in subtab has a column with the same name as the parent's primary key one, the link will be generated using them.
  3. Using AD_Tab.WhereClause. In case it is not possible to use #1 or #2, the relation must be set in the child tab's Where Clause field. For more info about this clause, read the document about Dynamic Expressions.

Tab common elements

Locking mechanism

All WAD generated tabs implement a simple Optimistic locking mechanism.

When a record is loaded in edition mode, its updated timestamp is stored. If the record is modified and saved, this stored timestamp is compared with the current one in database for that record. In case they are different, that record has been modified by another user or process and the application does not allow to save the current modifications. Because otherwise, the modifications done from the record was loaded till the current time would be overwritten.



All tabs in Openbravo ERP have in the top side a toolbar, one of the icons in this toolbar is a magnifying glass.


When this icon is clicked on, a filter pop-up is opened. This filter allows to enter some criteria to reduce the number of shown records.


Defining filters

The filter icon is shown for all tabs in the application. When no filter is defined for a table, the fields that appear in this filter are the ones that are part of the record identifier for this column. Anyway, it is possible to add more fields to this popup.

Filters are managed from column tab (Application Dictionary || Tables and Columns || Table >> Column), to add a column to the filter just check the Filter Column field.

The field representation in filter pop up depends on the reference the column has. For numeric and date references a minimum and maximum text boxes are displayed to insert ranges.

Note that the percentage symbol (%) is a wild character in filters which stands for any character.

Transactional Windows

Windows for documents can be set as Transactional. Documents have a status, which initially is Draft.

When a transactional window is accessed, by default it appears filtered. The applied filter is all the documents with status Draft or which date is in the defined Transaction Range. If the filter pop up is opened and the default filter is chosen the transactional filter is removed.

To define a window as transactional go to Application Dictionary || Windows, Tabs, and Fields || Window tab and select the Window Type as Transaction.

To define the Transaction Range go to General Setup || Application || Session Preferences and define in the Transaction Range the maximum number of days that processed documents will be shown in.

High Volume Tables

When a table is set defined as High Volume (in Application Dictionary || Tables and Columns || Table tab) and the tab that displays it is set to by default be shown in edition mode (Default Edit Mode in Application Dictionary || Windows, Tabs, and Fields || Window >> Tab tab), when the tab is accessed a filter is shown.

Filter Clause in Tab

In Application Dictionary || Windows, Tabs, and Fields || Window >> Tab tab there is a Filter Clause field. This field allows SQL where clauses to be used as default filter for the tab. When the tab is accessed this filter is applied, to remove it just click on the filter icon and select the default empty filter.

Note that this field is different than the SQL Where Clause which also accepts where clauses, but this clause is permanent and cannot be removed by user.


Fields are contained in tabs, each field has a column (from the same table as the tab's one) associated. It displays and allows to edit the column's value.

The way a field is displayed within the tab is determined by the reference its associated column has.

Some (the definition for all fields involving a field definition are listed here) of the things to take into account when configuring a field are:

ERP 2.50:Developers Guide/Concepts/AD/Data Model | ERP 2.50:Developers Guide/Concepts/AD/Menu 

Retrieved from ""

This page has been accessed 11,754 times. This page was last modified on 14 June 2011, at 11:03. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.