Page History
[ |../../index.htm#lansa/wamtut01_0700.htm]
You are here:
...
WAM050 – A Section Maintenance Application
This simple logic could be incorporated into WAM iiiSecMaint, however, you will instead create a new WAM to illustrate building a multi-WAM application.
1. Review the following web page:
- The AutoComplete weblet will support the department code input field
- All other fields will be entered
- A New button will be added to the Begin page for iiiSecMaint to call iiiSecAdd.
- The Add Section WAM will return to Section Maintenance Begin WebRoutine when a section is successfully added.
- Section Maintenance Begin WebRoutine will then list the sections for the department for which a section was added.
2. Create a new WAM iiiSecAdd– Add Section using Layout Weblet iiilay01. Consider what common definitions and logic you could copy from iiiSecMaint. What WEB_MAPs will be required in the 'AddSect' WebRoutine?
3. Create a basic outline for your WAM based on the following pseudo code
Define a work field DEPT_IN based on DEPTMENT
Define a Group_by of all fields for the Section table. All fields should be input capable
Map field STDRENTRY for *both, as a *hidden field
Define a WebRoutine "AddSect"
Map field DEPT_IN for *both
Map group_by for Section fields for *both, all fields should be input capable. DEPTMENT should be a hidden field
End routine
Your Your code should now look like this: Function Options
Function Options(*DIRECT)
Begin_
...
Com Role(*...
EXTENDS #PRIM_WAM)...
Layoutweblet('iiilay01')...
Define #DEPT_IN Reffld(#DEPTMENT)
Group_
...
By Name(#SECT_DETL)...
Fields((...
#DEPTMENT *hidden)...
#SECTION #SECDESC #SECADDR1 #SECADDR2 #SECADDR3 #SECPCODE #SECPHBUS)
*
Web_Map For(*BOTH)
...
Fields((...
#STDRENTRY *HIDDEN))...
*
WebRoutine Name(AddSect)
...
Desc('...
Add Section')
Web_
...
Map For(*BOTH)...
Fields(#Dept_...
In #SECT_DETL)...
* ----------------------------
...
* Add section logic goes here
* ----------------------------
Endroutine
End_Com
...
