Changing background colours of objects in WAMS used in VLF .Net

Date:2 December 2011
Product/Release:Visual LANSA Framework, V12 SP1 (From EPC870)
Abstract:How to make sure background colour is not overridden in WAMs used in VLF .Net
Submitted By:LANSA Technical Support

All WAMs that are executed in VLF .Net have the CSS overridden to ensure that the background colours matches the overall .Net theme. This ensures consistency within your .Net application, without having to redesign your WAMs.

The downside to this is that any specific CSS changes to background colour (i.e. for grid rows) will be lost at runtime. However, as of EPC870 a change has been introduced to allow you to disable overriding for specific elements or sections of your WAM.

The tag is vlfnet_styleadjust and it should be used as follows:

<td class="text" vlfnet_styleadjust="no" style="background-color:red;">

This works for regular tables, and elements that you have direct access to, but in the case of weblets, where the individual element tags are not available, the application of the tag can be done further up in the DOM chain. As an example, when making style changes to a Grid weblet, the tag could be put in the grid wrapper <div> tag:

<div id="SKILLS_wrap" class="std_grid_wrapper" vlfnet_styleadjust="no">

This turns off the VLF style overriding processing for anything inside the grid wrapper - including the grid itself. To make changes to the style, you would need to create a CSS file which is then included in your WAM. Please note that the disclaimers for applying CCS changes to the VLF apply to VLF.Net as well.