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"

(Description)
(Usage: Added a some notes regarding OutlineServices (copy from New and Noteworthy 4.0) and TablePageData output binds and conflicting names)
Line 25: Line 25:
 
   importPageData(pageData);
 
   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>
 
</source>
  

Revision as of 09:33, 28 August 2014

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

TablePageData is the standard data transfert object for The Scout documentation has been moved to https://eclipsescout.github.io/. between the The Scout documentation has been moved to https://eclipsescout.github.io/. and the The Scout documentation has been moved to https://eclipsescout.github.io/..

Description

Important.png
Required version
The API described here requires version 3.10.0 or bigger.


TablePageData are based on The Scout documentation has been moved to https://eclipsescout.github.io/. to hold the data. In Addition, TablePageData also contains a boolean flag (limitedResult) 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

@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);
}
  • OutlineService

The The Scout documentation has been moved to https://eclipsescout.github.io/. of Scout also offer support to select into TablePage data. For example:

SQL.selectInto("SELECT person_nr, last_name, first_name FROM person INTO :{personNr}, :{lastName}, :{firstName}", pageData);

For your table field, if you decide to switch your The Scout documentation has been moved to https://eclipsescout.github.io/. 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 discussed in the forum. As a workaround please provide a name for the output bindings:

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));

Generation

SDK Support

Note.png
TODO
Add a screenshot


PageData anotation

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

Note.png
TODO
Add a description


See Also

Back to the top