List Samples

This section shows how field visualizations can be used in lists:

Edit Box

CheckBox    

Edit Box with Prompter    

Image

Spin Edit

ImageAndText    

ComboBox

Reusable Part

 

PRIM_GRID (Grid Control), PRIM_LTVW (ListView Control) and PRIM_TRVW (Tree Control) all support Field Visualization. They differ a little in what they allow but if a feature is allowed it can be implemented in the same way as any other control. The following details a little of how these controls differ in their Field Visualization features.

Grid Control

The LANSA Grid offers the most complete feature set for Field Visualization in a List component. Any cell of the grid can be visualized as per the rules for the column. As the grid offers the full feature set of Field Visualization functions it is with this component that most of the samples to follow will use.

List View Control

The LANSA List View control also offers the full feature set of Field Visualization but they are subject to the limitations of a ListView. Limitations include:

  • ListView must be have ViewStyle(Report)
  • Only Column with DisplayPosition(1) is editable.

 

Tree Control

The LANSA Tree Control only allows Edit Appearance capabilities of Field Visualization. This is because a Tree Control must always look like a Tree Control.

 

Moving on to how Field Visualization is used in the List components:

The various columns of the List components PRIM_GDCL (Grid Column), PRIM_LVCL (ListView Column) and PRIM_TVCL (Tree Column) all have properties that support Field Visualization. These properties include:

Display Appearance

Defines how the item is to be drawn. DisplayAppearances include:

  • Check Box
  • Edit
  • Image
  • ImageAndText
  • MultiLine Edit

Edit Appearance

Defines how the item is to be edited. This is distinct from DisplayAppearance as you have a greater choice of options to choose from with EditAppearance. EditAppearances include:

  • Check Box
  • Edit
  • Image
  • ImageAndText
  • MultiLine Edit
  • ReusablePart
  • SpinEdit

Editor Part

The name of the component to be used for editing when the EditAppearance is set to ReusablePart. The part entered must conform to the following rule:

  • Reusable Part must have a default property.
    It is through this property that the current value will be set and get values in the list.

UsePicklist

This property has been added to PRIM_EVEF, PRIM_EVSE, PRIM_GDCL, PRIM_LVCL & PRIM_TVCL. It is a design-time only property. The purpose of this property is to specify whether the picklist of a field, once specified, is to be used as part of the formatting for the relevant component.

The primary purpose of this property is seen as a way to introduce Field Visualization concepts bit by bit to a large system. Older components can work as they always have with UsePicklist=FALSE whereas new components can have UsePicklist=TRUE to gain access to new functionality.

Editor

The actual Editor used by the column.

 

 

Example: A PRIM_EVSE ( SpinEdit ) has been defined for a numeric field that also includes a Picklist. If the UsePicklist property is FALSE then when visualized the SpinEdit will work as normal through the range of allowable numbers. If UsePicklist=TRUE then the SpinEdit will cycle through the picklist values.

Field Visualization in a List component is somewhat trickier than Field Visualization on a form. Forms are pretty straight forward as you simply add the classes to the field source and then use those classes on a form. You cannot get into too much trouble as you can only access functionality that you have added to your field source. The list components are a little harsher on less experienced users. This is because with a list component all you ever have to work with is a column. This means that the full set of Field Visualizations is always available whether or not they are relevant to the field currently sourced to the column. For this reason greater care should be taken when using Field Visualization in the List components. Ensure you have read all the samples and have a clear understanding of what you are trying to accomplish before proceeding. When in doubt refer to the provided samples for a clue.