Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

  1. Create a new WAM:
         Name: iiiEmpAutoCmpl
         Description: Employee Number AutoComplete
         Layout Weblet: iiilay01

...


  1. Copy the following WebRoutine from WAM iiiEmpSearch.

...

  1.      WebRoutine Name(Empno_Prompt)

...

  1.  Response(*JSON)
    Web_

...

  1. Map For(*input)

...

  1.  Fields(#empno)
    Web_

...

  1. Map For(*output)

...

  1.  Fields((#emp_

...

  1. dd *json))
    Def_

...

  1. List Name(#emp_dd)

...

  1.  Fields(#empno #std_code)

...

  1.  Counter(#std_count)

...

  1.  Type(*Working)
    Clr_

...

  1. List Named(#emp_dd)

...


  1. Select Fields(#emp_dd)

...

  1.  From_File(pslmst)

...

  1.  Where(#std_

...

  1. count <= 3) With_Key(#empno)

...

  1.  Options(*

...

  1. startkey *endwhere)
    #std_

...

  1. code :=

...

  1.  #empno
    Add_Entry To_List(#emp_dd)

...


  1. Endselect
    Endroutine
     

...

  1. Compile the new WAM.