Consultor Eletrônico



Kbase 16493: WebSpeed 1.0 - Using Selection-Lists
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
SUMMARY:

This Knowledge Base entry addresses some of the issues that may
arise when using Selection-lists or Combo-boxes with WebSpeed 1.0. Selection-lists and Combo-boxes can both be implemented in WebSpeed using the HTML SELECT form element. A Combo-box is simply a
Selection-list of size 1.

EXPLANATION:

One problem that a user might encounter is that the
Selection-list may fail to appear on the Web Browser, even
though the list is populated with a number of items in the
HTML file. This is because the user needs to define the
selection-list list-items in the Web Object to match the
items defined by the SELECT form element in the HTML file.
This can be accomplished programmatically or via the
List-Items dialog box.

SOLUTION:

1) List-Items dialog: Use this method if there is a finite
list of list-items that will not change. This dialog is
invoked by first selecting the selection-list Property
Sheet and double-clicking on the List-items field.

2) Programmatically: Use this method when you wish to
populate the selection list iteratively or if it is to be
populated based on the entries in one of the tables in the
database. For example, using the Add-last method.

matching-cust-name:ADD-LAST(customer.name)

The placement of the ADD-LAST statement also determines when and
where the Selection-list is populated. If you populate it in the
GET section it will not appear in the POST, and vice versa.

To make the Selection-list available on both the GET and the POST sections you should populate the object in the MAIN BLOCK before
the call to PROCESS-WEB-REQUEST (this is in {hapmain.i}). This
will also affect whether the screen-value for the Selection-list
is set on the POST from the GET. Once the Selection-list is
populated before the call to INPUT-FIELDS, the web.input trigger
for the selection-list will take care of setting the screen-value.
If you customize your own web.input trigger for the selection-list remember that you will need to manually set the screen-value.