DefaultVisual for field Visualization

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
adale
Posts: 164
Joined: Wed Apr 08, 2020 9:18 pm
Location: Poplarville, MS

DefaultVisual for field Visualization

Post by adale » Sat Jun 22, 2024 12:29 am

I am sure there is a simple answer to this, but I am just missing it.
For reference, I am working in VL 15 (150060) if that makes a difference.

I have a field (Decimal(1,0)) with two visualizations defined - the simple VisualEdit, and a SpinEdit. I have set the SpinEdit as DefaultVisual(True). Code below.

My question is, when I drag the field onto a VL Web Page, View, or Dialog, why is the visualization resulting in the simple VisualEdit, and not the default SpinEdit?

If I click the dropdown arrow by the field to display the different visualizations, I can drag and drop the SpinEditField onto the page, this results in the visualization being the expected SpinEdit.

Is the Defaultvisual parm a legacy parm that is not applicable to VL Web pages, views, dialogs?
Why have a Defaultvisual parm if it is not going to actually be the default visual when the field is used?
Or, am I just completely misunderstanding what the Defaultvisual parm is intended to be used for?

Code: Select all

*
BEGIN_COM Role(*EXTENDS #PRIM_OBJT)
BEGIN_COM Role(*Visual #PRIM_EVEF) Name(#VisualEdit) Usepicklist(False) Componentversion(1) Height(21) Width(227)
END_COM
BEGIN_COM Role(*Visual #PRIM_MD.SpinEditField) Name(#SpinEditField) Hint('Number of item extra(s) to be included with the menu item.') Defaultvisual(True)
END_COM
END_COM
Arlyn Dale
Servias LLC

Post Reply