Customizing the Miscellaneous state system

The Miscellaneous State Dictionary provides secondary state values that can be used to complement OSI, Bellcore or SNMP standards. The secondary states included in this dictionary are often used in telecommunication network supervision applications. For information on the dictionary and its graphical representation, refer to
You can create your own miscellaneous secondary state, and configure how new and existing secondary states are graphically represented in your objects.

How to create new Miscellaneous states (using the API)

IltMisc.SecState state = IltMisc.NewSecState("Misc.SecState.Problem", "Severe 
Problem");
NewSecState takes two arguments. The first one is a name that identifies the new miscellaneous state in the application. The name must comply with the rule Misc.SecState.<value> . For example, when a new state is created with name Misc.SecState.Problem , it is referred to in XML files in the following way:
<misc>Problem</misc>
The second argument is a description. This description is used as a tooltip to display more information about the miscellaneous state represented in a business object. To activate the tooltip support for secondary states, see Customizing tooltips.
NewSecState returns an instance of IltMisc.SecState that can be used in exactly the same way as the predefined Miscellaneous secondary states.

How to create new Miscellaneous states (using CSS)

You can also create new miscellaneous states by using global CSS settings:
Settings {
   misc: true;
}
Misc {
   states[0]: @+misc0;
}
Subobject#misc0 {
  class: 'ilog.tgo.model.IltMisc.SecState';
  name: "Misc.SecState.Problem";
}

How to customize Miscellaneous states (using the API)

Each Miscellaneous secondary state is associated with an icon that can be customized using IltSettings.SetValue . This method requires two arguments, the first argument being the property key name. Miscellaneous secondary state property names are formed by: “<YOUR STATE NAME>.Icon”.
IlpImageRepository imageRep = 
IltSystem.GetDefaultContext().getImageRepository();
Image problemImage = imageRep.getImage("problem.png");
IltSettings.SetValue("Misc.SecState.Problem.Icon", problemImage);
or
IltSettings.SetValue("Misc.SecState.HighTemperatureWarning.Icon", img);

How to customize Miscellaneous states (using CSS)

You can also customize miscellaneous states by using global CSS settings. For more information, see Using global settings. You must specify the full state name, for example " Misc.SecState.Problem ", when matching the " name " attribute. The CSS property to be customized is icon .
setting."ilog.tgo.model.IltState"[name="Misc.SecState.Problem"] {
   icon: '@|image("problem.png")';
}