Find more posts tagged with
Sort by:
1 - 1 of
11
Sort by:
1 - 1 of
11
Hello @monakhov
The Enum displays(names) are in the dictionary file named enumtype.def. Anyway, EMA downloads this dictionary from the server automatically by default. To get the Enum display according to its value, just call FieldEntry.enumDisplay(). FieldEntry is in com.thomsonreuters.ema.access package.
The example snipped source code:
//in onRefreshMsg(..) and onUpdateMsg(..)
decode(msg.payload().fieldList());
...
void decode(FieldList fieldList)
{
for (FieldEntry fieldEntry : fieldList)
{
System.out.print("Fid: " + fieldEntry.fieldId() + " Name = " + fieldEntry.name() + " DataType: " + DataType.asString(fieldEntry.load().dataType()) + " Value: ");
if (Data.DataCode.BLANK == fieldEntry.code())
System.out.println(" blank");
else
switch (fieldEntry.loadType())
{
...
case DataTypes.ENUM :
System.out.println(fieldEntry.hasEnumDisplay() ? fieldEntry.enumDisplay() : fieldEntry.enumValue());
break;
...
}
}
}
You can see the complete application source code in AppClient class of example360__MarketPrice__View that I have suggested you in your previous question.
Hope this help.
Hello @monakhov
The Enum displays(names) are in the dictionary file named enumtype.def. Anyway, EMA downloads this dictionary from the server automatically by default. To get the Enum display according to its value, just call FieldEntry.enumDisplay(). FieldEntry is in com.thomsonreuters.ema.access package.
The example snipped source code:
You can see the complete application source code in AppClient class of example360__MarketPrice__View that I have suggested you in your previous question.
Hope this help.