[ |../../index.htm#lansa/wbfeng01_0515.htm]
You are here:

Step 2. Add Logic to Reusable Part

In this step you will create an OnAdd method which will be invoked when the web page uses ADD_ENTRY to add employee details from the list returned by the xEmployeeDataServer server module.
1.  Switch to the Source tab.  
     Extend the Role keyword on the Begin_Com statement to include the following highlighted code:
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #prim_tree.iTreeDesign *listfields #ListFields) Displayposition(1) Height(270) Left(0) Tabposition(1) Top(0) Width(500) Layoutmanager(#TableLayout1) Themedrawstyle('listitem')
  
     *implements #Prim_Tree.iTreeDesign means this reusable part implements a User Defined Control which will be implemented as the row of a tree control in the web page.
     *listfields #ListFields defines a Group_By defining the fields to be mapped into this component when a row is added to the Tree list. That is, when an instance of this component is created.
2.  Define a Group_by, named ListFields as shown: