Attributes for Fields in Web Maps
Note the
parameter of the Web_Map command affects which fields and working lists are exchanged between the Presentation Layer and the Webroutine. You might find it helpful to think of all the relevant Web_Map commands as defining a parameter list for your Webroutine.However, the
parameter of the Web_Map command does not affect how the field is presented – that is the job of the Presentation Layer.While you may want certain values to be for (
), you may not want the user to be able to change them, or indeed see them, on the web page. To do this, you can specify the following attributes for fields in Web Maps:– the data is displayed on the web page, but the user cannot change it.
– the data is passed between the logic and Presentation Layers, but the user cannot see it.
– the data is passed between the logic and Presentation Layers, but the data is not merged into the XSL. (This has specialized uses where the value of a field or contents of a list are referenced during the XSL transformation process but do not need to be generated into the final page).
Note: *input is also a valid attribute, and is the default.
Remember, though, that how the field is represented is the responsibility of the Presentation Layer. The field attributes you set in your web map to control this are only effective when the web design is generated for the Webroutine. After that you can alter how the field is represented using the LANSA Editor. What this also means is that
, as ultimately the Presentation Layer controls how the field is represented.Here's an example where a DEPTMENT is to be passed back and forth and displayed, but you don't want the user changing its value:
Particular things to note about this example are:
- The only effect of specifying the field attribute is to make field #DEPTMENT output-only when generating the web design for the Webroutine – it does not mean that the field remains as output-only on the web page as it may be changed using the LANSA Editor.
- If field #DEPTMENT is output-only on the web page, the web page will not POST the field value back to the next Webroutine. For example, if the Webroutine posts its data back to the same Webroutine, then it will not work because the value of field #DEPTMENT, being output-only, will not be posted. If, however, this Webroutine is invoked by some other Webroutine that does POST a value for field #DEPTMENT, then this use will work.
As you can see, specifying
as a field attribute has a very different meaning and effect to using for( ) on the Web_Map command.