COMPANY
COMMUNITY
BLOG
HELP
MY ACCOUNT
EN PT ES

Imagen6931E

Getting Started with GeneXus 9.0 & Ajax

You can try GeneXus 9.0 and Ajax functionality using GeneXus 9.0.

One of the most important challenges for developers today is to be able to implement applications with friendly interfaces for their end users. Depending on the level of interaction with the end user, the application interface can generate a positive or a negative experience. Among other things, a friendly interface implies making data entry and edition as simple and fast as possible.

GeneXus 9.0 introduces properties that can be setup to simplify data entry and help in the design of more attractive and friendly interfaces, with the automatic inclusion of Ajax based code.

We'll explain the use of these properties (InputType and Suggest) with an example you can try with the new GeneXus 9.0 Getting Started, which can be accessed at: http://www2.gxtechnical.com/portal/hgxpp001.aspx?15,8,77,O,E,0,,1936

Let's consider a Customer transaction with the following attributes:

The Web Form by default that corresponds to this Transaction is the following:

Now let's consider the Invoice Transaction with the following attributes:

You will notice that CustomerID and CustomerName attributes are present in this Transaction.

The default Web Form for this Transaction is the following:

Now we go back to design, we right click on the CustomerID attribute and we select Properties.

In the Control Info Tab we can setup the following properties (see figure):

  • Input Type = Descriptions
  • Descriptions form = CustomerName
  • Suggest = Incremental

Thus, instead of entering a Customer by their code, it will be possible to enter him by his name, and the programs will get the correspondence automatically.

The Suggest property will offer all the possible customer names that correspond with what is being typed. These features are part of the implementation of Ajax by GeneXus.

With this new settings for the CustomerID attribute, the default Web Form of the Invoice Transaction is the following:

Notice that the Web Form has changed to reflect the change in the CustomerID attribute properties. E.g.: the CustomerName attribute is not shown on the form, because the CustomerID attribute will be based on it for data entry. This will greatly improve the application usability.

We will now see the application in runtime. Some data is entered in the Customer Transaction, as shown in the following figure:

Then we execute the Invoice Transaction and we start the entry.

When we reach the CustomerID attribute we will notice that it is not necessary to know the customer's code to enter or select it from a selection list; you must just enter the first letters of the customer name (CustomerName) and GeneXus will suggest name matches for the letters entered. A list with possible values will be displayed.

As shown in the figure, if you start typing "Jo" customers whose name starts with that string will be suggested.

This is due to the automatic code inclusion made by GeneXus based on Ajax, to implement the settings made in the CustomerID attribute; i.e.: that the CustomerID attribute would take the descriptions of the CustomerName attribute and GeneXus will be enabled to suggest possible values according to the data entered.

GeneXus 9.0 Getting Started:
http://www2.gxtechnical.com/portal/hgxpp001.aspx?15,8,77,O,E,0,,1936

 

Related
GeneXus 9.0 and Ajax
Automatic Inclusion of Ajax Based Code