Show Contents List
The File Web component allows you to use an external file to store HTML. The file will be treated as a data stream file. The contents of the file will be sent to the browser by LANSA, without interpreting any of the data streams contained in the file. This component allows you to circumvent the 256-character limitation in LANSA. This component is mainly used with output fields.
On the IBM i, the file is a standard physical file. The physical file will be created when the file component is created. The library must be defined as part of the file name.
On Windows, the file is a standard text file. The text file will be created when the file component is created. The directory must be defined as part of the file name.
A LANSA Object Access Module is not required to use the file, i.e. the file is not identified to the LANSA Repository.
For example, you might have a large text document which needs to be displayed as part of a Web page. This document is maintained as a standard PC word processing file. Using tools like Word, you can save this document as an HTML file. When the File Web component is embedded into your page, this information will be sent to the browser.
Using the File Web component means that you do not have to create and edit large documents within the Web Function Editor. (Remember, all files created using the Web Function Editor are stored internally in the LANSA database.) Also, because you are using a standard file object, it is also possible to execute programs which read and write from this file before it is used in your Web page.
File Web components can be created manually and they can be automatically generated by LANSA Web. If the File Web component is created manually, then the File must be manually defined. LANSA Web will create the file if it is automatically generated.
For details about manually creating a File Web component, refer to File Component.
For details about automatically creating a File Web Component, refer to Generate File Component (HTML mode).
IBM i Files
On the IBM i, your File Web components may use library lists. Library lists can be very powerful. For example, if your application requires you to display different data for the same field, depending on the user profile used to run the application, then a library list can be used with the user profile and File Web component.
A different file can be created for each user profile. Each file contains the HTML to display the data. These files would be installed to the appropriate library. The library list attached to the user profile would then be used to locate the correct file.
When the application is executed, LANSA Web will use the File Web component. However, it will use the library list attached to the user profile to locate the correct file, since no library is attached to the file definition in the Web component registry.
Show Contents List