Tutorials for Web Functions & WEBEVENTs
What are the Web Function Tutorials?
The LANSA Web Function Tutorials are a set of exercises designed to introduce and reinforce the fundamental skills required to build Web Function Applications with LANSA. The tutorials are integrated into the online documentation.
To install the tutorials, refer to Tutorial Installation.
The following tutorials are included:
WEB001 - Types of LANSA Web Functions
Web Functions Wizard Tutorials
WEB002 - Coding a WEBEVENT Functions
WEB004 - LANSA Generated HTML Pages
WEB009 - Web Page Substitution (Optional - Advanced)
WEB010 - Web Skeletons (iSeries)
WEB013 - JavaScript and Browse Lists
WEB016 - Customizing Personnel Application (Optional)
Who Should Use the Tutorials?
The Tutorials can be used by novice and experienced LANSA developers who wish to learn how to build Web function applications with LANSA for the Web.
In order to use the tutorials, you must be able to create LANSA processes and functions using templates. You should know how to edit RDML and how to create fields in the LANSA Repository.
Your Feedback
Your feedback regarding these tutorials will help us improve the overall quality of the LANSA documentation and training. Please email your comments to [email protected].
How Do I Use the Tutorials?
It is recommended that you complete the tutorials in sequence. The processes and functions created in the first tutorials are reused in later tutorials.
The first steps in an exercise provide very precise descriptions of the tasks to be performed. As the steps and tutorials progress, the instructions become much more general.
All the tutorials use HTML. Be sure to use HTML mode when you use the Web Function Editor.
The tutorials use the files from the Personnel Demonstration System.
What Partition Should I Use?
It is recommended that you use the DEM partition for the tutorial. The DEM is automatically installed with a LANSA for iSeries system and is quickly set up using Partition Initialization on a Visual LANSA system. The DEM system contains the Personnel System demonstration system which contains the files used by the tutorial.
If you do not use the DEM partition, you can set up another partition with the Personnel System files. Remember, the partition must be properly Web-enabled.
If you do not use DEM, you can select any of your partitions when using the tutorials. Testing or training partitions are ideal. You will need to import the Personnel System demonstration files into the partition.
If you intend to set up another partition, it is recommended that you do NOT use WEB as the partition identifier as this a reserved space and any changes to this partition may affect other Web-enabled partitions in your system.
How Many Developers Can Use the Training?
There is no limit on the number of developers who may use the training at the same time. However, it is important that developers have a unique identifier for their work.
In the tutorial, each developer will use an object prefix iii which can be based on his or her initials or could be assigned by a system coordinator. For example, you will be asked to create a process named iiiPROC01. If your initials are JDS, you would create a process named JDSPROC01.
This iii prefix must be unique in the LANSA system (not just the partition) as the iii prefix is used to create system variables. System variables are shared by all partitions.
Setup Checklist
Check that these tasks have been completed before using the tutorials. If not, go to the instructions following and complete them as applicable:
- Have you Web enabled the partition?
- Do you have the Personnel System demonstration files (DEPTAB, SECTAB, PSLMST, etc.) installed into the partition?
- Have you loaded the graphic files used in tutorial WEB013? (See item 5 in the iSeries Installation Steps below.)
- Have you installed the Web Functions Wizard into the partition?
You will require this information about your specific installation:
- The site address for your Web Server
- The partition being used
- A user profile and password with authority to the LANSA partition
- A user profile and password if process authentication has been set up.
If you have not been able to answer "yes" the Setup Checklists question, you will need to carry out some or all of the following steps.
iSeries Installation Steps
1.Select the partition to be used for training. (You may wish to create a new partition.)
2.Use the PERSYS import on the LANSA iSeries Software CD-ROM to import the Personnel System application into the partition.
3. Web enable the partition. For details, refer to the Task: Set up IBM i Partition for Web Development in the .
4. Use the LWEBWIZ2 import in the LANSA program library to import the Web Functions Wizard into the partition.
5.This step is optional.
For the results as shown for Tutorial WEB013, ten graphic files are required. (These files will be supplied if you do the LANSA Web training in a classroom.)
You can create your own files, preferably images sized 144 x 155 pixels (2.000 x 2.083 inches). Name the images emp1.jpg through to emp10.jpg and load them to the LANSA default directory /images on your Web Server. You should also specify the file names in the Business Phone field of accessible records in the PSLMST file.
If these files are not in the /images directory, or not specified in the PSLMST file, it will not affect the objective of the exercise. Instead of an employee picture, you will simply see a box with an X, as no image is found.
Windows Installation Steps
If you have a DEM partition with the Personnel System files already installed in your Visual LANSA system, then you should be albe to skip this step.
Create New Partition
If you wish to create a brand new partition:
1.Follow the instructions to create a new Partition in Create New Partition in the
2.Initialize the new partition as described below.
Initialize a Partition
To prepare your new or existing partition for use with these Tutorials, you will need to web enable the partition and install the Personnel System files. To do this, complete the following steps:
1.Log off Visual LANSA if you are logged on.
2.Log on to Visual LANSA.
3.Highlight the partition to be used for training. If you don't have a partition to use, then create it as described above.
4.Enter your password, but do not press OK.
5.Press the
button to open the dialog box.
5.In the
dialog, select (that is, tick) the appropriate options. These are:- , if the partition is not yet web enabled.
- .
- to obtain the data needed for the tutorials.