Genero Web Client Basics / Type Ahead |
The idea behind the Type Ahead mechanism is to move the focus to the next field before receiving the answer of the runtime system, and synchronize the user interface once the answer is received.
The "natural" field flow is defined by your application. It may depend on the form, on the dialog, on the options (FIELD ORDER) set for the program or the dialog. See the Genero Business Development Language User Guide for more details on how to configure the field flow.
The field order will be transmitted to the browser, which will take care to respect it and synchronize until the answer arrives.
DEFINE ad RECORD name, address1, address2, city, st, zipco STRING END RECORD ... INPUT BY NAME ad.*
Which means that the focus will start in Name, then in the two address fields, city, state and then ZIP code. On a slow network, without Type Ahead mechanism, entering "John Doe" and pressing tab key will display a loading overlay until the answer arrives:
Figure 1. Loading overlay waiting for field validation to return
With either the HTML5 theme or the Silverlight theme, while waiting for the answer, the focus immediately goes in the next field and let the user fill data. The synchronization will occur when the answer arrives:
Figure 2. Type Ahead allowing user to continue to work while waiting for field validation
A spinning wheel will be the indicator there currently an out of sync sequence.
While waiting for the answer, all actions (focus, change, data, scroll, and so on) are buffered and will be sent immediately after. The action list is then unrolled and each action is sent by the engine to the runtime, whose answers will validate it (see Type Ahead workflows).
The user will also be notified (with a visual and sound effect) that something went wrong (see Type Ahead workflows).