Advanced Customization > Windchill Adapter > Custom Windchill Adapter Webjects > About the wt.adapter.delegates.properties File > Defining Delegates for Attribute Translation
  
Defining Delegates for Attribute Translation
When a group is returned from Windchill adapter webjects, the FORMAT parameter determines whether or not the attribute values in the group type instances are formatted for the end user.
The attribute translation delegates defined in wt.adapter.delegates.properties determine how attribute values are translated when attribute formatting is requested by the user. Attribute translators are also used to translate values from external string form to the internal type needed by objects being created or updated.
The form of an attribute translation delegate is:
Attribute.attributeClass=attributeTranslatorClass
attributeClass is the fully qualified name of the class of the attribute value to translate
attributeTranslatorClass is the fully qualified name of the class that performs the translation
An attribute translation delegate entry is also valid for super classes of attributeClass. If no attribute translator is found for attributeClass, then a default translator is used.
The following example states that attribute values of the simple type boolean should be formatted for the end user by using the com.ptc.core.adapter.server.impl.BooleanTranslator class:
Attribute.boolean=com.ptc.core.adapter.server.impl.BooleanTranslator
This returns a string value of "true" or "false" for the boolean object content of the attribute.
Attribute values can also be translated from Windchill types. The following example indicates that attribute values of type com.ptc.core.meta.common.TypeInstanceIdentifier should be formatted for the end user by using the com.ptc.core.adapter.server.impl.ObjectReferenceTranslator class:
Attribute.com.ptc.core.meta.common.TypeInstanceIdentifier=
com.ptc.core.adapter.server.impl.ObjectReferenceTranslator
The ObjectReferenceTranslator class translates a TypeInstanceIdentifier by returning the persistence identifier of the TypeInstanceIdentifier.