| US 7,552,129 B2 | ||
| Automatically binding and populating a selection control with both display labels and identification values | ||
| Li Xu, Cary, N.C. (US); and Jianjun Zhang, Cary, N.C. (US) | ||
| Assigned to International Business Machines Corporation, Armonk, N.Y. (US) | ||
| Filed on Apr. 26, 2006, as Appl. No. 11/411,664. | ||
| Prior Publication US 2007/0256052 A1, Nov. 01, 2007 | ||
| Int. Cl. G06F 7/00 (2006.01); G06F 9/44 (2006.01); G06F 15/16 (2006.01) | ||
| U.S. Cl. 707—101 [717/109; 709/229] | 1 Claim |

| 1. A computer-implemented method comprising:
utilizing a processor in a computer to execute computer program instructions that, when executed, perform the steps of:
drag-and-dropping two data structures from a data tree into a widget, wherein the data tree is displayed in a data pane of
an Integrated Development Environment (IDE), and wherein the widget is displayed in an editor pane in the IDE;
binding labels and identifiers to the widget;
recording the labels and identifiers in a metadata area of the IDE;
in response to determining that the widget is list-bindable, that there are exactly two data structures, and that both data
structures are multi-valued, predictively determining that one of the data structures is an identifier value and another of
the data structures is a label, wherein the identifier value identifies multiple labels for record entries contained within
a file identified by the identifier value, and wherein predictively determining that one of the data structures is the identifier
value and another of the data structures is the label comprises the steps of:
determining if one of the data structures is a string list and another of the data structures is a non-string list, wherein
if one of the data structures is a string list and another of the data structures is a non-string list, then determining that
a string list data structure is a label and a non-string list data structure is an identifier value,
determining if one of the data structures is a numeric list and another of the data structures is a non-numeric list, wherein
if one of the data structures is a numeric list and another of the data structures is a non-numeric list, then determining
that a numeric list data structure is an identifier value and a non-numeric list data structure is a label,
in response to determining that object names of the data structures are indicative of whether a data structure is an identifier
value or a label, describing and identifying the data structures according to the object names of the data structures, and
in response to determining that object names of the data structures are not indicative of whether the data structure is the
identifier value or the label and in response to subsequently determining that either of the data structures have been used
and have been identified and recorded in a look-up table as being either an identifier value or a label, describing and identifying
the data structures according to entries in the look-up table, wherein said determining that either of the data structures
have been used and have been identified and recorded in the look-up table as being either the identifier value or the label
only occurs after said determining that object names of the data structures are not indicative of whether the data structure
is the identifier value or the label;
binding the two data structures to the widget only if one of the data structures is determined to be an identifier value and
another of the data structures is determined to be a label;
in response to determining that both of the two data structures have been incorrectly described as being either an identifier
value or a label, switching identifier value and label descriptors between the two data structures before binding the two
data structures to the widget; and
in response to the look-up table not being accessible, randomly describing and identifying the data structures as being either
an identifier value or a label.
|