|Download • Git|
|Forums • Blog • Twitter • G+|
LookupCalls can be used in smart fields, tree boxes and other Scout widgets. They compute the Smart association: to a key a lookup row is associated. This allows to provide more than a text to the key (The lookupRow also contains an Icon, Colors, a TooltipText...)
This Shema explain the role of a LookupCall in a SmartField:
Lookup calls provide different method to compute the set of LookupRows :
getDataByKey()Retrieve a single lookup row for a specific key value. Used by SmartFields and SmatColumns to get the display text for a given value.
getDataByText(): Retrieve multiple lookup rows which match a certain String. Used by SmartFields when the user start to enter some text in the Field.
getDataByAll(): Retrieves all available lookup rows. Used by SmartFields when the user clic on the browse icon.
getDataByRec(): This can only be used for hierarchical lookup calls. It retrieves all available sub-tree lookup rows for a given parent.
Type of lookup calls
With a Lookup Service
Delegation to the Lookup Service on server side.
They are not necessarily restricted to a fix number of records. Instead they should be favoured if the set of records is rather large.
Principe of the Local Lookup Calls
An example of this approach is when a SmartField or a SmartColumn is configured to be use with a CodeType. A
CodeLookupCall is instantiated for the CodeType. It creates the LookupRows corresponding to the codes in the CodeType.
Defined with getConfiguredXxxxxx() methods.
- Service: Defines which service is used to retrieve lookup rows
- MasterRequired: Defines whether a master value must be set in order to query for multiple lookup rows