FAQ: What field is used on the left side of the Identify Results dialog box?
What field is used on the left side of the Identify Results dialog box?
When using the identify tool included with MapObjects-Java applications, including the Java Viewer, an Identify Results dialog box displays the identified features. The left side of the dialog box lists a value from a field presumably used to uniquely or intuitively define which features have been identified. The identify functionality selects this field (in order, not case-sensitive) from the active data layer by searching for the first field containing the text "name", then "id", then "code", then it uses the first attribute field. In the example below, the first field with the text "name" is "STATE_NAME", thus its values are used in the left side of the Identify Results dialog box (see the red circle).
If the data layer contains no attributes, then the feature object is displayed as a string, for example, com.esri.mo.cs.geom.BasePolygon@f5d030. There are no public methods available to alter this functionality.