Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/LookupCall"

(Description)
Line 3: Line 3:
 
Lookup calls are used by {{ScoutLink|Concepts|SmartField|smart fields}} and {{ScoutLink|Concepts|SmartColumn|columns}} to look up single or multiple {{ScoutLink|Concepts|LookupRow|lookup rows}}.
 
Lookup calls are used by {{ScoutLink|Concepts|SmartField|smart fields}} and {{ScoutLink|Concepts|SmartColumn|columns}} to look up single or multiple {{ScoutLink|Concepts|LookupRow|lookup rows}}.
  
* extends: {{ScoutJavadoc|LookupCall|C}}
+
* Class: {{ScoutJavadoc|LookupCall|C}}
  
 
== Description ==
 
== Description ==
LookupCalls are similar to code types. They can also be used in smart fields, tree boxes and other Scout widgets. However, they are not necessarily restricted to a fix number of records. Instead they should be favoured if the set of records is rather large.
+
 
 +
LookupCalls can be used in smart fields, tree boxes and other Scout widgets. They compute the Smart association: to a key a {{ScoutLink|Concepts|LookupRow|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:
 +
 
 +
[[Image:Schema LookupCall.png]]
 +
 
 +
=== Input ===
 +
Lookup calls provide different method to compute the set of {{ScoutLink|Concepts|LookupRow|LookupRows}} :
 +
 
 +
* <code>getDataByKey()</code> Retrieve a single lookup row for a specific key value. Used by SmartFields and SmatColumns to get the display text for a given value.
 +
* <code>getDataByText()</code>: Retrieve multiple lookup rows which match a certain String. Used by SmartFields when the user start to enter some text in the Field.
 +
* <code>getDataByAll()</code>: Retrieves all available lookup rows. Used by SmartFields when the user clic on the browse icon.
 +
* <code>getDataByRec()</code>: 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 {{ScoutLink|Concepts|Lookup Service|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.
 +
 
 +
===Directy===
 +
Principe of the {{ScoutLink|Concepts|LocalLookupCall|Local Lookup Calls}}
 +
{{note|TODO|Explain and mention the execCreateLookupRows method}}
 +
 
 +
An example of this approach is when a SmartField or a SmartColumn is configured to be use with a {{ScoutLink|Concepts|CodeType|CodeType}}. A {{ScoutJavadoc|CodeLookupCall|C}} is instantiated for the CodeType. It creates the LookupRows corresponding to the {{ScoutLink|Concepts|Code|codes}}  in the CodeType.
  
 
== Overview ==
 
== Overview ==
Line 17: Line 43:
 
* {{ScoutProp|MasterRequired}}: Defines whether a master value must be set in order to query for multiple lookup rows
 
* {{ScoutProp|MasterRequired}}: Defines whether a master value must be set in order to query for multiple lookup rows
  
== Methods ==
+
== Code ==
* {{ScoutEvent|getDataByKey}}: Retrieve a single lookup row for a specific key value
+
{{note|TODO|Code example: accessing a LookupRow by key direcly}}
* {{ScoutEvent|getDataByText}}: Retrieve multiple lookup rows which match a certain  String
+
* {{ScoutEvent|getDataByAll}}: Retrieves all available lookup rows
+
* {{ScoutEvent|getDataByRec}}: This can only be used for hierarchical lookup calls. It retrieves all available sub-tree lookup rows for a given parent
+
  
 
== See Also ==
 
== See Also ==

Revision as of 03:36, 30 December 2010

The Scout documentation has been moved to https://eclipsescout.github.io/.

Lookup calls are used by The Scout documentation has been moved to https://eclipsescout.github.io/. and The Scout documentation has been moved to https://eclipsescout.github.io/. to look up single or multiple The Scout documentation has been moved to https://eclipsescout.github.io/..

Description

LookupCalls can be used in smart fields, tree boxes and other Scout widgets. They compute the Smart association: to a key a The Scout documentation has been moved to https://eclipsescout.github.io/. 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:

Schema LookupCall.png

Input

Lookup calls provide different method to compute the set of The Scout documentation has been moved to https://eclipsescout.github.io/. :

  • 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 The Scout documentation has been moved to https://eclipsescout.github.io/. 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.

Directy

Principe of the The Scout documentation has been moved to https://eclipsescout.github.io/.

Note.png
TODO
Explain and mention the execCreateLookupRows method


An example of this approach is when a SmartField or a SmartColumn is configured to be use with a The Scout documentation has been moved to https://eclipsescout.github.io/.. A The Scout documentation has been moved to https://eclipsescout.github.io/. is instantiated for the CodeType. It creates the LookupRows corresponding to the The Scout documentation has been moved to https://eclipsescout.github.io/. in the CodeType.

Overview

LookupCall.png

Properties

Defined with The Scout documentation has been moved to https://eclipsescout.github.io/. methods.

Code

Note.png
TODO
Code example: accessing a LookupRow by key direcly


See Also

Back to the top