Step 5 Customize Browse List

LANSA Web Functions

Step 5. Customize Browse List

In this step, you will create a page component for the browse list used in function iiiFN11. This component will allow you to customize the browse list appearance.  After adding the component to the browse list, all other fields will be hidden so that only the component appears on your Web page.  This technique is the best way to manipulate the layout of a browse list without having recompiles affect the changes. 

 

1.  Using the LANSA for the Web editor, create a new HTML page. 

2.  When the new page appears, delete all of the default HTML code.

3.  Add the following lines to the page:

<TR>

<TD VALIGN="MIDDLE"><RDML COMPONENT="iiiIMAGE"></TD>

<TD VALIGN="MIDDLE"><RDML MERGE="GIVENAME"></TD>

<TD VALIGN="MIDDLE"><RDML MERGE="SURNAME"></TD>

<TD VALIGN="MIDDLE"><RDML MERGE="EMPNO"></TD>

</TR>

 

     Notice that you have changed the order of the fields from the order used in the browse list.

4.  Save the document as iiiBL11 with description iiiFN11 Browse List Component.

5.  Using the LANSA for the Web editor, open the Maintain Components window.

6.  Select Add, to add a new component as follows (where iii is your course assigned ID):

Component

iiiBL11 

Type

Page

Description

iiiFN11 Browse List Component

Page

iiiBL11

Mode

OUTPUT

 

  

7.  Close the Maintain Components window.

8.  Working with your iiiPROC03 process, edit the function named iiiFN11 Employee List.

     Define a new field iiiBL11 which will be used for the Web page component iiiBL11.

DEFINE    FIELD(#iiiBL11) TYPE(*CHAR) LENGTH(1)

 

  

     Change the browse list by removing the iiiIMAGE field as this component is now embedded using the iiiBL11 Web component. Change the remaining fields to use an attribute of *HIDDEN. Finally, add the field iiiBL11 with an attribute of *NOID to the beginning of the list. 

     The DEF_LIST should appear as follows:

DEF_LIST   NAME(#iiiEMPLST) FIELDS((#iiiBL11 *NOID)(#EMPNO *HIDDEN) (#GIVENAME *HIDDEN) (#SURNAME *HIDDEN)(#PHONEBUS *HIDDEN)) ENTRYS(9999)                                                

 

  

9.  Exit and save your RDML function.

10.   Compile your RDML function iiiPROC03/iiiFN11.