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.
I created a custom instance list (ancestor #VF_AC012O) because I needed to implement a custom "right click" popup menu. I got the menu working properly but I noticed that custom instance lists don't have the "Select Columns" button.
I assume I have to create one myself and I found the SelectColumnsMenu component that is part of VF_AC012O and I can add menu items to it and get events from it. But every time I click an menu, all the items disappear. Not only that but it seems like it's images cannot be found as well.
I am not finding any documentation on how to work with the SelectColumnsMenu, so any advice is appreciated.
How do I get access to the Framework Manager? Access to the avGetImageReference and avRecordTrace is all on the manager, but I cannot seem to get to it from the custom instance list.
Why are the menu items disappearing and how do I stop it?
How do I get the "True" and "False" images to show up like in the default list?
Is there any documentation regarding the use of this component?
You should avoid using VLF internal parts unless they are documented.
This is because they are likely to change from version to version and your code will probably no longer function.
I had assumed we could use them since it was part of the ancestor we have to use when creating a custom instance list.
I ended up recreating almost all the functionally of the list just to get one "new" piece of functionality, a right click menu.
If I may make a suggestion, it would be really nice to have access to the framework manager in custom instance lists, so that we can use tracing and get access to the images.
As it is, I had to create new Bitmap images of existing VLF-ONE graphics to get the "Organize", "Cross" and "Go Tick" images and use SYS_WEB.Console.Log to get feedback from the list while developing it. It would have been much easier to use the #avFrameworkManager.avRecordTrace and avGetImageReference methods.
Come to find out uSystem is defined in the ancestor. I simply did not know it was there much less that it gave you access to the framework manager.
Is is safe to say then that when inheriting VLF components you should only use methods / components that are prefixed with a "u" i.e. "uSystem", "uInitialize" etc.?
If I may make a follow up request, is it possible to have the documentation, specifically this page http://docs.lansa.com/14/EN/lansa048/in ... 8_6090.htm updated to include notes about getting access to the framework with uSystem, not attempting to use the ancestors components, and that if you need column visibility toggling, column re-ordering and list clearing functionality (things the default instance list will give you) you will need to implement these manually.
The safest things are prefixed "av" (stand for 'application visible') - they are stable should never cause you a forward comparability issue.
Generally "u" (User) prefixed things are also okay, but we have some prefixed "u" that are not correct at the moment so we are going rename them in the next version. You should look at the F2 help for "u" things to double check usage recommendations. We are going to use the prefix 'zInt_" to indicate they are VLF internal/private and where the z prefix makes them go to the end of auto-complete prompts.
We will also update the documentation.
It's my impression, formed largely from VLF-WIN users, that people only bother to build custom snap in instance list browsers when they want q quite different instance list visualization (eg: as a calendar, or a carousel, or images). Why do you need to create one?
The note says:
If you create your own instance list browser or browser panel, you may need to also produce your own version of built-in-browsers features such as column visibility toggling, column reordering, item sorting, list searching, conversion to CSV data, etc. Whether you do need to do this depends on whether that feature is relevant to the way that your instance list data is visualized. In addition, future enhancements to the built-in browsers may not be automatically available in your custom version.
The short version is that I needed to implement a "right click" menu on the list and I could not find a way to do this with the default list.
The long version, is that the users tend to copy some information from their 5250 screens that we are replacing with VLF-ONE. They kept trying to copy the Visual Ids displayed on the title of the window and could not, as they just moved the window around.
I've tried a couple different options to get them that copy functionality like a "selectable" label in the details, a "Copy" button, but nothing seemed to work well. What we really wanted was something more akin to the native browser right click "Copy" function.
That presented a couple challenges. First getting the right click menu and secondly getting access the browsers clipboard. I solved the menu problem by implementing a custom instance list and setting its "Popup" property to my "right click" menu. The clipboard was a more difficult to take down because I don't have native access to the clipboard. So I ended up creating a "hidden" widget that uses Clipboard.js to handle the clipboard interactions.
Works pretty well so far and the users seem happy with it.