Styling > Customizing Object States > Customizing the SNMP State System > Creating a New Attribute in the System Group

JViews TGO defines a specific attribute group to store SNMP System attributes. You can retrieve this attribute group with the method IltSNMP.GetSNMPAttributeGroup. The attributes present in this group are business object attributes, as defined in IlpAttribute.

JViews TGO provides an attribute class IltAttribute), which you can use directly when customizing the SNMP System group.

To extend the attributes in the SNMP System Group, do the following:

  1. Create a new attribute with its type and attribute group.
IltAttribyte myAttribute = new IltAttribute("address", 
                           String.class, 
                           IltSNMP.GetSystemAttributeGroup());
  1. Register the attribute in the SNMP System Group.
  2. To do so, use the method IltSNMP.SetAttributeMapping(IlpAttribute attribute, Object defaultValue, String captionLabel). This method allows the attribute to be automatically represented in the object System Window.
IltSNMP.SetAttributeMapping(myAttribute, defaultValue, "Address");
  1. Customize the representation of this attribute through cascading style sheets.
  2. When adding a new attribute to the System Window, create a selector for the object and attribute (object."ilog.tgo.model.IltObject/address"). This selector contains the following properties:
    The following example illustrates the way to customize an attribute inside the System Window.
object."ilog.tgo.model.IltObject/address" {
  visibleInSystemWindow: true;
  captionLabel: Address;
  captionLabelVisible: true;
  label: @address;
}