Summary

LANSA WAM

Summary

WAM030 - Employee Enquiry

Important Observations

  • The WEB_MAP statement allows you to specify which incoming and outgoing fields the WebRoutine maps between the web page and the WebRoutine. The WEB_MAP statement's FOR() selector specifies whether the fields are mapped as an incoming (*INPUT), outgoing (*OUTPUT), or both (*BOTH).
  • Only fields in a WEB_MAP statement with a FOR(*OUTPUT) or FOR(*BOTH) can be placed on the web page.
  • Acceptable field attributes are *INPUT and *OUTPUT (also *in and *out). If unspecified, the default is *INPUT. These attributes determine whether the field accepts input, as input text box, or only displays output.
Note an important distinction here:
  • The WEB_MAP FOR() parameter determines whether fields and lists are mapped into the WebRoutine, out of the WebRoutine or in both directions.
  • A field's *INPUT or *OUTPUT attribute determines whether the field will be input capable on the page (the default) or output only.
  • Note also that fields with an *output attribute cannot be mapped back into a WebRoutine.
    • You can open a WebRoutine in the Design view using the icon in the RDMLX source
    • You can drag and drop fields and lists marked FOR(*OUTPUT) or FOR(*BOTH) onto your page at any time from the tab.

    Tips & Techniques

    • Weblet properties can be assigned string literals or XPath expressions. The XSL processor then evaluates the XPath expression. XPath expressions accept general logical comparison operators <, >, != <=, >= etc., as well as mathematical operators *,/,+,- etc.
      For a quick reference to XPath see: www.mulberrytech.com/quickref/XSLT_1quickref-v2.pdf.
      For a more detailed reference, see www.w3schools.com.
    • With the WAM open in the editor, you can compile from the Home ribbon or open the Compile options dialog from the Menu button on the Compile group on the Home ribbon.

    • You can also use a context menu by selecting a WAM in the Repository tab or Favorites/Last Opened tab.
    • For a new WebRoutine, it is not necessary to do a compile to generate the XSL, since a  Build also generates the XML / XSL, but without doing a full compile.
    • Note: XSL can be generated for a selected WebRoutine using the context menu option, WebRoutine: nnnnnnn / Generate XSL in the LANSA Editor.

     

    What I Should Know

    • How to create a simple enquiry WAM.
    • How to open the Design view for a specific WebRoutine.
    • What is generated by a WAM compile.
    • A WAM may contain more than one WebRoutine
    • A WebRoutine name may be up to 20 characters long.
    • There is one WAM layout generated for each WAM with the name xxx_layout, where xxx = the WAM name.
    • By default, fields are visualized as a label and edit box
    • Fields are displayed in a table
    • A WebRoutine may be called by a weblet such as a push button, via its on_click_wrname property.
    • Field names or a group_by may be used to define fields in a web_map.