21 March 2016

1. Theme Support

TVC will as of the 2011.2.0 version adopt the UI to be closer to the UI as of V6R2012 if TVC is used together with this ENOVIA version. If TVC is used with an older version of ENOVIA, the standard look and feel of TVC is used.

E.g. TVC will adjust look and feel depending on ENOVIA version used.

To support this, we have added support for so called themes within TVC. Currently, we support the following themes within TVC:

  • classic

  • v6r2012

  • v6r2013x

  • v6r2014x

  • v6r2015x

  • v6r2015xOOTB

In future releases of TVC, we plan to develop other themes as well.

Unless a specific theme has been configured to be used, the theme-manager within TVC will decide what theme it will use by default by checking the ENOVIA version.

To explicitly specify what theme to be used, one can apply the following init-parameter to the TVC servlet in WEB.XML:

<init-param>
    <param-name>tvc.core.theme.current</param-name>
    <param-value>classic</param-value>
</init-param>

NOTE: You can configure TVC to use the V6R2012 theme even if you aren’t using this ENOVIA version. However, this should not be done, since the CSS files within the V6R2012 theme is referring to images that is provided by ENOVIA V6R2012.

The support for TVC to use the 2015xOOTB theme has resulted in that all icon used across TVC component has look and feel more like OOTB when this theme is selected.

It is also possibly to switch theme at runtime. A person with administration privileges can execute the following URL to do so:

${ROOT_DIR}/tvc-action/changeTheme

Calling this URL will give a screen allowing the administrator to change the theme among the available themes.

The support for different themes has resulted in that all style sheets (CSS files) used across all TVC components has been renamed, moved and divided into several files. If you for some reason have used our CSS files, the HREF’s to those CSS files will as of this release be broken.

1.1. Referencing a Stylesheet

If you want to use a stylesheet in TVC, you should never do that by the path to the file. Instead, one should use the "id" of the stylesheet as defined in the theme configuration files within TVC.

To reference a stylesheet from a JSP page, one will do as shown below:

<%@ taglib uri="/WEB-INF/tvc-core.tld" prefix="core" %>
...
<core:themeArtifact id="id-of-artifact"/>
<core:themeArtifact id="id-of-another-artifact"/>

To reference a stylesheet from a renderer (java class), one typically do:

import com.technia.tvc.core.gui.resource.Resource;
import com.technia.tvc.core.gui.resource.ThemeArtifact;
...
Resource resource = new ThemeArtifact("id-of-artifact");

Note that a theme artifact associated with an ID, might refer to one or several different files at the end. This might also vary depending on the current theme. E.g. the same artifact ID might result in three CSS files for theme A, while for theme B, it might result in two CSS files.

Below is a compressed list of common CSS files with their path used from the previous release of TVC and their new "artifact id" reference to be used as of 2011.2.0.

Old Path (Before 2011.2.0) Reference ID (as of 2011.2.0)

/tvc/core/styles/tvcUIDefault.css

tvc-ui-default

/tvc/core/styles/tvcForm.css

tvc-form

/tvc/structurebrowser/styles/tvcTablePreferences.css

table-preferences

If you have referenced another CSS file not in the list, please consult Technia for information how to reference it correctly as of 2011.2.0.