Page History
WAM085 - Enhancing the User Interface
This step illustrates how you can create a small response WAM to service any web page that uses an AutoComplete weblet for field employee number (EMPNO). 1. Create
- Create a new WAM:
Name: iiiEmpAutoCmpl
Description: Employee Number AutoComplete
Layout Weblet: iiilay01
...
- Copy the following WebRoutine from WAM iiiEmpSearch.
...
WebRoutine Name(Empno_Prompt)
...
Response(*JSON)
Web_
...
Map For(*input)
...
Fields(#empno)
Web_
...
Map For(*output)
...
Fields((#emp_
...
dd *json))
Def_
...
List Name(#emp_dd)
...
Fields(#empno #std_code)
...
Counter(#std_count)
...
Type(*Working)
Clr_
...
List Named(#emp_dd)
...
Select Fields(#emp_dd)
...
From_File(pslmst)
...
Where(#std_
...
count <= 3) With_Key(#empno)
...
Options(*
...
startkey *endwhere)
#std_
...
code :=
...
#empno
Add_Entry To_List(#emp_dd)
...
Endselect
Endroutine
...
- Compile the new WAM.