Summary
WAM005 - Create Your First WAM
Important Observations
- A WAM layout is created using by default if a layout is not selected on the Create WAM dialog.
- If a WAM has not been compiled, if a WebRoutine is opened in the Design View, the web page will be generated using weblet and the fields and lists mapped for output in the WebRoutine.
Note: In this case the web page will not be re-generated when the WAM is compiled unless the option is selected. There are more details on this subject in later exercises.
- Once a WAM is compiled, a web page with a WAM specific layout (that you can modify) and field entry controls is generated for each WebRoutine that can be edited in the Design view. You can drag and drop fields and lists marked FOR(*OUTPUT) or FOR(*BOTH) onto your page at any time from the Design view's tab.
- Weblets are reusable XSL snippets or components that can be plugged into either your WebRoutine page or other Weblets. There are standard Weblets that encapsulate HTML buttons, hyperlinks, menu items, radio buttons, dropdown lists, etc.
- When viewing a list of available Weblets in , you will notice a Weblet with a Description of . Std_button_v2.xsl is an XSL document consisting of one or more <xsl:template> element.
- The dialog, lets you choose whether or not to re-generate the XSL for existing WebRoutines. By default, a compile will always generate XSL for new WebRoutines ONLY. That is, the web page design for each new WebRoutine is generated automatically.
- The generated web page includes all fields and LISTS in your WEB_MAPs marked FOR(*OUTPUT) or FOR(*BOTH). Fields mapped with a FOR(*INPUT) keyword, are incoming fields to the WebRoutine. They are not available when creating the web page output by this WebRoutine.
- The compile generates a WAM-specific layout Weblet. Its name is WAM iiifirst is the WAM's . followed by where
- The generated web page also has a Weblet on the page, a WebRoutine description in a heading and a DIV where you may place objects that you do not want to be displayed on the page.
Tips & Techniques
- You can compile from either the LANSA Editor directly, or from the Repository or Last Opened tabs.
- It is not necessary to do a compile to generate the web page, since a build also generates it, but without doing a full compile.
- When compiling, the New WebRoutines option. option always defaults to the
- The Generate XSL All WebRoutines option will generate, or re-generate the XSL for ALL WebRoutines in the WAM and will lose any changes made to the web pages in the Design view.
- You can make a hidden field visible for debugging purposes.
What I Should Know
- How to create a Web Application Module (WAM).
- How to define a WebRoutine.
- How to use a WEB_MAP statement to define inputs and outputs to a WebRoutine.
- How to open the Design view for a specific WebRoutine.
- How to use some of the basic editing features of the Design view.
- How to create a table.
- How to use a Weblet.
- How to compile a WAM.
- What a compile generates.