VLWEB Tree

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

VLWEB Tree

Post by soa »

I have a RP with a tree defined as

Define_Com Class(#PRIM_TREE<#eFormTextLine>) Name(#treeItems) Displayposition(2) Left(0) Parent(#COM_OWNER) Tabposition(2) Top(50) Height(220) Width(500)

I'm loading it thus

Define_Com Class(#Prim_tree.TreeItem) Name(#Result) Reference(*DYNAMIC)

#WRK5000 := 'This is the first line'
#Result <= #treeItems.Add( #eFormTextLine )

#WRK5000 := 'This is the second line'
#Result <= #treeItems.Add( #eFormTextLine )

eFormTextLine is defined as

Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_Tree.iTreeDesign *ListFields #ListFields)

Group_By Name(#ListFields) Fields(#WRK5000)

Under debug in the OnAdd method the field #WRK5000 is blank. I thought it would contain 'This is the first line' etcetera based on the *ListFields

Mthroutine Name(OnAdd) Options(*Redefine)
#lblTextLine := #wrk5000

Endroutine

What am I doing wrong? I'm a bit rusty!

Cheers
dannyoorburg
Posts: 177
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: VLWEB Tree

Post by dannyoorburg »

Hi,

I think you need to use the ADD_ENTRY command for the field-mapping to work... I'm not sure it runs as part of the Add method.

Danny
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: VLWEB Tree

Post by soa »

Thanks Danny, you are spot on!
Post Reply