Considerations for using File Web Components

LANSA Web Functions

Considerations for using File Web Components

LANSA will automatically generate an empty AS/400 source physical file for your AS/400 file Web components.

Using the Web Function Editor, select the Components menu and choose the Generate Component - File.

You will need to enter the target AS/400 file specification (library name/file name) in the AS/400 file (out file) field. This file will be created as a source physical file and will be used to hold the "data", i.e. the HTML for the Web component.

If the Use library in component definition option is selected, each time the component is required in your application, the library and file combination is used. Do not select the option if you want to use the user profile used by LANSA for the Web to locate the file when you run your application. In this case, the library specification of the file is not stored in the LANSA for the Web component registry. This option is very useful if your application requires you to display different data for the same field, depending on the user profile used to run the application. You can use a different AS/400 file Web component for each user. In this case, a different AS/400 file would be created, each containing the HTML to display the data, for each user profile. These AS/400 files would be installed in the appropriate AS/400 library. The library list attached to the user profile would then be used to locate the correct file.

If the Use library in component definition option is not selected, the library for this component will not be stored as part of the file definition in the Web component registry. When the application is executed, LANSA for the Web will still use the Web component, but, it will use the library list attached to the user profile in order to locate the AS/400 physical file (since no library is attached to the file definition in the Web component registry).

Ý 10.6.2 Generate Component

Test Case:

Test Plan Writer:  Torkel CronholmDate Written:

LANSA Version: 11.4Date Last Tested:

Purpose:  Generate File Component from Web Function Editor dialog.

Comments:  For all test cases it is assumed that the tester knows how to generate a file component, and how to ensure that it is created. The test has to be performed on both a RDML and a RDMLX partition on both a Windows and an IBM i backend, ie, on four combinations (RDML Windows, RDML IBM i, RDMLX Windows, RDMLX IBM i). Some tests will not be applicable for RDML partitions, such as tests on LL2 files.

Use the option to provide a Use Library List for some of the tests. Please indicate with an L) which test items this option was used on.

Use the option to provide a blank entry for some of the tests. Please indicate with a B) which test items this option was used on.

Some of the tests should generate a web component where there already exists a web component. Please indicate with an R) which test items this test was done for.

On IBM i ONLY, some of the tests should generate a web component where Use library in component definition is selected. Please indicate with a U) which test items this test was done for.

1) if you specify the name of the output file, eg, FILE123, it will be created in the current library

2) if you specify the name of the output file, eg, P01DTALIB\FILE123, it will be created in P01DTALIB. If you ticked the check box the component definition will also include the library so the web runtime knows where to get the file

3) if you specify the name of the output file, eg, P01DTALIB\FILE123, it will be created in P01DTALIB. If you DID NOT tick the check box the component definition will NOT include the library so the web runtime will use the library list to get the file

For this test, suggested naming convention for components is iiiEFX#LD, where

iii stands for the initials of the tester

E stands for Editor (the components can be generated by a BIF as well as from command line)

F is for a Visual component

X is the type of component. Use C for Check box, D for Drop down, L for ListBox and R for Radio button.

# is denoting LL1 or LL2 file where applicable. Use 1 for LL1, 2 for LL2 and 0 if not applicable).

L is for data type for Value when creating a Drop down, ListBox or Radio button. Use A for Alpha, P for Packed, S for Signed, C for Char, D for Date, T for Time, Z for DateTime, I for Integer, F for Float, S for String and omit if not applicable.

D is for data type for Description when creating a Drop down, ListBox or Radio button. Use A for Alpha, P for Packed, S for Signed, C for Char, D for Date, T for Time, Z for DateTime, I for Integer, F for Float, S for String and omit if not applicable.

Example: A tester named Douglas Noel Adams creating a File component using a Drop down with element override for an LL2 file (using Alpha for Value and Signed for Description) should name the component: DNAEFD2AS.

For Check Box, use any test for Value and Description fields.

Ensure that the nominated file is physically created in the File System for both Windows and IBM i. Also ensure that the nominated file overwrites the file if it already exists. An easy way to do the overwrite test is to generate a different type of component and check its contents afterwards.

In test items 1 - 27 the tester will attempt create a file component according to above.

The expected result in test items 1 - 27 is that the component is created as per the test.

Tester: ______________________Date Commenced: ________________Date Completed:________________

 

Test Expected Results

 

Pass/ Fail

1

Checkbox:

 

 

2

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Alpha

 

 

3

Drop down, ListBox and Radio button using LL2 file

Value: Packed, Description: Alpha

 

 

4

Drop down, ListBox and Radio button using LL2 file

Value: Signed, Description: Alpha

 

 

5

Drop down, ListBox and Radio button using LL2 file

Value: Char, Description: Alpha

 

 

6

Drop down, ListBox and Radio button using LL2 file

Value: Date, Description: Alpha

 

 

7

Drop down, ListBox and Radio button using LL2 file

Value: Time, Description: Alpha

 

 

8

Drop down, ListBox and Radio button using LL2 file

Value: DateTime, Description: Alpha

 

 

9

Drop down, ListBox and Radio button using LL2 file

Value: Integer, Description: Alpha

 

 

10

Drop down, ListBox and Radio button using LL2 file

Value: Float, Description: Alpha

 

 

11

Drop down, ListBox and Radio button using LL2 file

Value: String, Description: Alpha

 

 

12

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Alpha

 

 

13

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Packed

 

 

14

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Signed

 

 

15

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Char

 

 

16

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Date

 

 

17

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Time

 

 

18

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: DateTime

 

 

19

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Integer

 

 

20

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: Float

 

 

21

Drop down, ListBox and Radio button using LL2 file

Value: Alpha, Description: String

 

 

22

Drop down, ListBox and Radio button using LL1 file

Value: Alpha, Description: Alpha

 

 

23

Drop down, ListBox and Radio button using LL1 file

Value: Packed, Description: Alpha

 

 

24

Drop down, ListBox and Radio button using LL1 file

Value: Signed, Description: Alpha

 

 

25

Drop down, ListBox and Radio button using LL1 file

Value: Alpha, Description: Alpha

 

 

26

Drop down, ListBox and Radio button using LL1 file

Value: Alpha, Description: Packed

 

 

27

Drop down, ListBox and Radio button using LL1 file

Value: Alpha, Description: Signed

 

 

28

Drop down, ListBox and Radio button using incorrect LL1 file

Error message in Web Function Editor

 

29

Drop down, ListBox and Radio button using incorrect LL2 file

Error message in Web Function Editor

 

30

Drop down, ListBox and Radio button using correct LL1 file, but incorrect fieldnames

No message in Web Function Editor, but the components will not be created

 

31

Drop down, ListBox and Radio button using correct LL2 file, but incorrect fieldnames

No message in Web Function Editor, but the components will not be created

 

32

Leave some of the required text fields empty when generating a visual component

Error message in Web Function Editor

 

33

Check the tab order in the dialog (Either when in "Check Box" mode or in "Drop down, ListBox and Radio" mode)

Tab order is from top to bottom, left to right