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/TablePageData"

(Usage: Added a some notes regarding OutlineServices (copy from New and Noteworthy 4.0) and TablePageData output binds and conflicting names)
(Replaced content with "The Scout documentation has been moved to https://eclipsescout.github.io/.")
 
Line 1: Line 1:
{{ScoutPage|cat=Shared}}
+
The Scout documentation has been moved to https://eclipsescout.github.io/.
 
+
TablePageData is the standard data transfert object for {{ScoutLink|Concepts|TablePage}} between the {{ScoutLink|Concepts|Client Plug-In|client Plug-In}} and the {{ScoutLink|Concepts|Server Plug-In|server}}.
+
 
+
* extends: {{ScoutJavadoc|AbstractTablePageData|C}}
+
 
+
== Description ==
+
{{important|Required version|The API described here requires version 3.10.0 or bigger.}}
+
 
+
TablePageData are based on {{ScoutLink|Concepts|TableData|bean-based TableData}} to hold the data. In Addition, TablePageData also contains a boolean flag (<tt>limitedResult</tt>) to indicate if the table contains all rows or if the request was limited to X rows in the server. In this case, when the PageData is imported, a status is displayed in the status bar of the table.
+
 
+
=== Usage ===
+
* A page date is the typical return value for the methods of the {{ScoutLink|Concepts|Outline Service|outline services}}.
+
* Importation in {{ScoutLink|Concepts|TablePage}} during the {{ScoutEvent|LoadData}} event. Here an example:
+
 
+
<source lang="java">
+
@Override
+
protected void execLoadData(SearchFilter filter) throws ProcessingException {
+
  PersonSearchFormData formData = (PersonSearchFormData) filter.getFormData();
+
  if (formData == null) {
+
    formData = new PersonSearchFormData();
+
  }
+
 
+
  PersonTablePageData pageData = SERVICES.getService(IStandardOutlineService.class).getPersonTableData(formData);
+
  importPageData(pageData);
+
}
+
</source>
+
 
+
* OutlineService
+
 
+
The {{ScoutLink|Concepts|Sql_Service|SQL Support}} of Scout also offer support to select into TablePage data. For example:
+
 
+
<source lang="java">SQL.selectInto("SELECT person_nr, last_name, first_name FROM person INTO :{personNr}, :{lastName}, :{firstName}", pageData);</source>
+
 
+
For your table field, if you decide to switch your {{ScoutLink|Concepts|TableData}} from array based table data to bean based table data, the SQL support provides you the same possibilites (holder, input bind, output bind, filter...).
+
 
+
Please note that it is not possible to use input and output bindings which use the same field names (e.g. input bind SearchForm :lastName and output bind TablePageData :{lastName}) as [https://www.eclipse.org/forums/index.php/t/803695/ discussed in the forum]. As a workaround please provide a name for the output bindings:
+
 
+
<source lang="java">
+
SQL.selectInto(""
+
  + "SELECT person_nr, last_name, first_name FROM person "
+
  + "WHERE last_name like :lastName "
+
  + "INTO :{out.personNr}, :{out.lastName}, :{out.firstName}",
+
  searchFormData,
+
  new NVPair("out", pageData));
+
</source>
+
 
+
== Generation ==
+
=== SDK Support ===
+
* Generation of TablePageData with the {{ScoutLink|SDK|Explorer_View|Explorer View}}
+
 
+
{{note|TODO|Add a screenshot}}
+
 
+
=== PageData anotation ===
+
{{ScoutJavadoc|PageData|A}} FormData annotation
+
 
+
{{note|TODO|Add a description}}
+
 
+
== See Also ==
+
* {{ScoutLink|Concepts|TablePage}}
+
* {{ScoutLink|Concepts|Outline Service}}
+
* {{ScoutLink|Concepts|Shared Plug-In}}
+

Latest revision as of 05:59, 14 March 2024

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

Back to the top