Representing and customizing state information

Representing primary and secondary states

Rogue Wave® JViews TGO predefined business objects are graphically represented with properties that change according to the states and alarms set on the objects.
In general, the primary state information is used to define the representation characteristics of the object base, while secondary states are added as new decorations. This predefined mapping can be modified through cascading style sheets (CSS). For information on how to create and use CSS files, see Introducing cascading style sheets.
JViews TGO provides a set of visual dictionaries that are used for displaying alarm and state changes in predefined telecom business objects. These dictionaries are based on the following worldwide telecommunication standards: OSI, Bellcore, SNMP, SONET, Performance, SAN, Alarm, Trap, and Miscellaneous state dictionaries. Each state dictionary provides visual representations of the states.
For information about each state dictionary and its graphical representation, see States.

Customizing states and alarms with CSS selectors

You can customize the object representation according to its states and alarms using CSS attribute selectors. An attribute selector is based on the IltObject attribute " objectState " (see ilog.tgo.model.IltObject#ObjectStateAttribute ) and is composed of the attribute name and the state name information.
The selectors can be used to customize the object graphic representation according to the different state and alarm dictionaries.
It is recommended that, when you specify a graphic property in an attribute selector, you provide an object selector that sets a default value to the property. This value will be used when the attribute is not defined. In other words, you can customize your objects according to the attribute values, but keep in mind that a consistent graphic representation should also be available when the attribute is not set in a specific object. Observe this policy whenever you create CSS attribute selectors to customize the object graphic representation based on states and alarms.
The following example illustrates this policy in a scenario that creates a graphic representation based on the presence of the state IltMisc.SecState.HighTemperatureWarning :
object."ilog.tgo.model.IltObject"["objectState.Misc.SecState.HighTemperatureWar
ning"] {
  labelForeground: red;
}

object."ilog.tgo.model.IltObject" {
  labelForeground: '';
}
In this scenario, when the state IltMisc.SecState.HighTemperatureWarning is present in the object, the label of the object changes to red. When the state is no longer present, the label color is set to its default value.