VLF-ONE Loading and Selecting Instance List from Command Handler

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
jyoung
Posts: 351
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

VLF-ONE Loading and Selecting Instance List from Command Handler

Post by jyoung » Thu Oct 19, 2017 2:04 am

Is it possible and/or how do I load and select an instance list from an Business Object Command?

My situation is this:

In our VLF-ONE app, we have multiple objects and allow "drill down" capablity between them. This means that while we are looking at one "picture" of an object, we can "switch" (using avSwitch) to another "picture" of the same object".

I typically manage this interaction through custom managers and it works ok if the object I am switching to has only one Filter and one Command. However, the command I am switching to has 4 Filters and 5 Instance Commands.

Since I cannot execute a Filter (would be really nice to do this ... hint hint!) I have to create a business object command that I can execute so that I can get the object in the instance list and selected, so that all the other instance commands will work.

The idea was touched upon here viewtopic.php?f=3&t=1492&p=3226 but I can't seem to figure out how to go about this.

EDIT

This was mentioned by MarkD here viewtopic.php?f=3&t=1507&p=3295#p3289
Have you considered sending a signal to the timesheet’s filter that says “Please put timesheet 1234 into the instance list, select it, and then execute its Details (default?) command”? Assuming that there is a filter, this might be a structurally simpler solution to program.
That may be doable, but given that the object may already be open, and the non-default Filter selected, (so I don't have it in my Manager) how do I tell the Filter to do this? The filter registers itself with its ObjectManager in the uInitialize and removes itself from the ObjectManager in the uTerminate

Code: Select all

mthroutine name(uInitialize) options(*REDEFINE)

*  Do any initialization defined in the ancestor
#COM_ANCESTOR.uInitialize

#CMGCCPObjectManager.Register filter(#COM_OWNER)

#COM_OWNER.avFilterLocation := LEFT /* This filter is on the left */
#COM_OWNER.avAllowLocationChange := True /* Allow user to move filter */

#wk_CountryCode := 1

endroutine

mthroutine name(uTerminate) options(*REDEFINE)

#CMGCCPObjectManager.Deregister filter(#COM_OWNER)

*  Do any termination defined in the ancestor
#COM_ANCESTOR.uTerminate

endroutine

Post Reply