Versions Compared

Key

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

...

Note

 Note: Using the AutoComplete prompt as you create the code, lists the srvroutines in a Server Module. For example:

     Your routine should perform the following:

     Define a component for the xDepartmentsDataServer server module, srvroutine FindAll, named GetDepartments.

     Execute GetDepartments asynchronously with parameter list xDepartmentsList.

     Within an event routine for GetDepartments.Completed

     Selectlist all xDepartmentsList entries

       Add each entry to the list component Departments

     End Select

     Retrieve the first entry in list Departments

     Set focus for currentitem

     Your code should look like the following:

     Mthroutine Name(LoadDepartments)
     Define_Com Class(#iiixDepartmentsDataServer.FindAll) Name(#GetDepartments)
     #GetDepartments.executeasync(#xDepartmentsList)
     Evtroutine Handling(#GetDepartments.completed)
     Clr_List Named(#Departments)
     Selectlist Named(#xDepartmentsList)
     Add_Entry To_List(#Departments)
     Endselect
     Get_Entry Number(1) From_List(#Departments)
     #Departments.currentItem.focus := true
     Endroutine
     Endroutine

6.  In the CreateInstance routine for the web page, add code to invoke the LoadDepartments method routine.

     Your code should look like the following:

     Evtroutine Handling(#Com_owner.CreateInstance)
     #com_self.LoadSearchTypes
     #com_self.LoadDepartments
     Endroutine

7.  Compile your web page.

...