Tag: vlf

8 characters is the limit

I keep forgetting this, cause I do development in other languages and frameworks as well, and nothing in the LANSA editor stops me. But WAM command handlers must not have a name of more than 8 characters.

Or rather, it can and it will work, but then when you try to set it up in the VLF, you, again without warning, enter the more-than-8 character name and lo and behold, you end up with errors on your site.

Instead, a command handler named, for example, CH_FAKKOP, should be referenced in the VLF by the first 8 characters, CH_FAKKO, even though the WAM component is 9 characters.

Edit: This also applies to the WAM name in XSLT, like

<xsl:with-param name="on_change_wrname" select="'UHandleEvent'" />
<xsl:with-param name="on_change_wamname" select="'CH_FAKKO'" />

VLF & switching

I have found it extremely useful to use the switching in the VLF to “jump” from one part of the application to another.

Unfortunately, the documentation is not entirely clear on these matters

It works simply by calling avSwitch on the framework manager:

#avFrameworkManager.avSwitch To(BUSINESSOBJECT) Named(BUDGET) Caller(#COM_OWNER) Execute(E6AA038E80AE4EE380BC1B36E753277B)

To() is either to BUSINESSOBJECT, APPLICATION or FRAMEWORK. I have only used it to switch to business objects.

Named() is the name of the business object (application or framework).


I have no idea why I need to use Caller(), nor what options I have here.

Execute() is the name of the command I want executed in the business objects. It is the name from the command definition, not from the business object command name.


I have also found it useful to pass a value through the manager, using the avSaveValue method. In the command handler signalling the switch I have written

Invoke Method(#avFrameworkManager.avSaveValue) Instance(1) Withid1(WFANE) Fromavalue(#FPLVALG)
#avFrameworkManager.avSwitch To(BUSINESSOBJECT) Named(BUDGET) Caller(#COM_OWNER) Execute(E6AA038E80AE4EE380BC1B36E753277B)

and in the command handler that is then executed I read (and immediately clear) the saved value

Invoke Method(#avFrameworkManager.avRestoreValue) Instance(1) Withid1(WFANE) Toavalue(#FANE)
Invoke Method(#avFrameworkManager.avSaveValue) Instance(1) Withid1(WFANE) Fromavalue('')

It is funny how the Instance, Withid1, Withid2 and Withid3 can be used to store a value in four dimensions. When I was first introduced to the Save/Restore methods I was told that Instance and Withid1 both had to be unique, but the idea is clearly to think of the instance value to enumerate a set of values while Withid1-3 are a, possibly multidimensional, key for saving and restoring the values.

And this is why some people hate Javascript

Working on our VLF application, I ran into a problem for our Microsoft Edge users: If the command handler window was expanded (the draggable bar pulled upwards) beyond a certain point, only the filter window contracted. Not the instance list and thereby effectively nor the command handler window.

The problem comes from resizing of the table cells, the function VF_SY001_PRIVATE_SizeInstanceList_Height in VF_XXNNN.js.

So I chose to overwrite the function in an additional javascript file, if the user is in Edge:

window.setTimeout(function() {
if (window.navigator.userAgent.indexOf("Edge") > -1) {
var func = VF_SY001_PRIVATE_SizeInstanceList_Height;
VF_SY001_PRIVATE_SizeInstanceList_Height = function(sHeight) {
let nHeight = parseInt(sHeight);
nHeight = nHeight + 24;
nHeight = "" + nHeight + "px";
document.getElementById("VF_UM011_Container").style.height = nHeight;
}, 1000);

I set the func variable to the original function, overwrite the function to call the original plus some extra code. Now I just need it tested by others.

A Farewell To Internet Explorer

For the first time since Internet Explorer 4, I no longer have to support the IE browser. The nail in the coffin is update 11.0.34 to Internet Explorer, as this messes up the Visual Lansa Framework frameview. I verified that it worked in 11.0.32 and 11.0.33, but from 11.0.34 the filter and instance list is hidden.

Given that Internet Explorer is all but discontinued, I no longer have to support it.