1.4.2 Web Maps
Web Maps are the interfaces for the exchange of data between your Webroutines and the Presentation Layer.
The specification of a web map that outputs a Department description to the Presentation Layer would look something like this:
Note the
parameter of the Web_Map command.The parameter values can be:
– this defines data that is coming from the Presentation Layer into the Webroutine.
– this defines data that is going from the Webroutine to the Presentation Layer.
– this defines data that comes into the Webroutine from the Presentation Layer and is sent from the Webroutine to the Presentation Layer.
The fourth value, 1.4.3 Being Stateless.
is described inSay you had a Webroutine whose job it was to accept a Department Code as input and then to output a Department Description. The specification of its Web Maps would look like this:
The department code is
to the Webroutine when it is executed and the Department Description is to the Presentation Layer when the Webroutine ends. These settings are very strict. That is, the value of DEPTMENT, as specified in this example, is only ever input to the Webroutine. Once the Webroutine ends, its value is not sent back to the Presentation Layer. Similarly, when the Webroutine begins executing, DEPTDESC has no value, as it is only ever output by the Webroutine.This is where the
parameter value of is very useful if your Webroutine needs to accept certain information as input as well as to be able to output it. A classic example of this is that of a simple file maintenance application. When a user wants to edit information about a Department, , the Webroutine should that information to the Presentation Layer in order to show it, but it should also be able to accept it as , as it may have been changed by the user. So the web map might look a bit like this:
As well as fields, working lists can be used to pass data back and forth. Simply specify the name of the working list on your Web Maps, just like this:
You can either use the identifier or the name of the field in the Web_Map command. The XSL and XML will be generated using the identifier. The WAM Editor will in most cases display the name but still use the identifier under the covers.