VL-WEB Reusable part in list & Event signaling

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
User avatar
Posts: 45
Joined: Thu Feb 11, 2016 11:41 pm

VL-WEB Reusable part in list & Event signaling

Post by Jiri » Sat Mar 05, 2016 1:58 am

VL-WEB list (Class(#PRIM_LIST) ) can contain columns realised by Reusable parts.
Define_Com Class(#PRIM_LIST.Part).... Design(#MyReusablePart)
Is there a way, how to signal an (user defined event) from the reusable #MyReusablePart ?
It is (of course) not possible directly, because the reusable part in list adopts only stadard list columns properties and events.
My idea was to create a collection of the reusable parts, which should be filled with the list, each entry points to particular reusable in one list row and then check the #Collection<>.event ). My idea has ended, when I did not found how to set the reference for collection population.
Any other idea how to realize it, or how to set the mentioned collection?

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: VL-WEB Reusable part in list & Event signaling

Post by Stewart Marshall » Sat Mar 05, 2016 9:51 am

Hi Jiri

Add a define_Com for the class of the reusable part and set it when ever the list focus changes. You'll then have a reference to listen to events on.

Define_Com Class(#MyReusablePart) Name(#CurrentPart) Reference(*Dynamic)

Evtroutine #List.ItemGotFocus
#CurrentPart <= #PartColumn.Currentitem.Part *as #MyReusablePart

Evtroutine #CurrentPart.Something


Stewart Marshall

Independent IT Consultant

Post Reply