Skip to main content

Notice: This Wiki is now read only and edits are no longer 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/TablePage"

(Events: add child page and virtual child page)
(Replaced content with "The Scout documentation has been moved to https://eclipsescout.github.io/.")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ScoutPage|cat=Component Model}}
+
The Scout documentation has been moved to https://eclipsescout.github.io/.
 
+
Table-oriented {{ScoutLink|Concepts|Page|page}}
+
 
+
* implements: {{ScoutJavadoc|IPageWithTable|I}}
+
* extends: {{ScoutJavadoc|AbstractPageWithTable|C}}
+
 
+
 
+
== Description ==
+
{{note|TODO|Add a description}}
+
* {{ScoutLink|Concepts|Table|Table}}
+
 
+
[[Image:HG_TablePage.png]]
+
 
+
=== Summary Cell ===
+
 
+
{{note|TODO|Merge this post: [http://www.eclipse.org/forums/index.php/mv/msg/452690/1007940/#msg_1007940 Summary Cell]. It explain how the summary cell is used to represent the child pages in the page tree.}}
+
 
+
== Screenshot ==
+
[[Image:ScoutScreenshotTablePage.png]]
+
 
+
 
+
== Properties ==
+
''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
+
 
+
{{note|TODO|Add a description of the more important properties (ore the properties specific to this element)}}
+
 
+
 
+
== Events ==
+
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
+
 
+
=== child page and virtual child page ===
+
{{ScoutEvent|CreateChildPage}} is triggered for each row of the table (the corresponding row is given as parameter). It is possible to get some of the values in the table to pass them to
+
the chid page.
+
 
+
<source lang="java">
+
@Override
+
protected IPage execCreateChildPage(final ITableRow row) throws ProcessingException {
+
MyNodePage childPage = new MyNodePage();
+
childPage.setId(getTable().getIDColumn().getValue(row));
+
childPage.setName(getTable().getNameColumn().getValue(row));
+
childPage.setComment(getTable().getNotesColumn().getValue(row));
+
return childPage;
+
}
+
</source>
+
 
+
For performance reason, because sometimes instantiating a page can be expansive, the concept of virtual page was introduced. Virtual pages are created by {{ScoutEvent|CreateVirtualChildPage}}. Virtual pages act like a proxy: only when they are activated the real corresponding page is instanciated with the corresponding call to {{ScoutEvent|CreateChildPage}}.
+
 
+
{{note|TODO|If virtual page are not handled properly you can see two kinds of bugs:
+
* Label of the node change (see [http://www.eclipse.org/forums/index.php/t/452690/ child page do not decorate untll it's been clicked in an outline based application])
+
* Pages disappears (occurs when {{ScoutEvent|CreateChildPage}} returns null -> a virtual child page is created and it desapears when its clicked).
+
TODO: Document these cases here.
+
}}
+
 
+
=== Other events ===
+
{{note|TODO|Add a description of the more important event and a list of the other events (grouped by type)}}
+
 
+
== See Also ==
+
* {{ScoutLink|Concepts|Table|Table}}
+
* {{ScoutLink|Concepts|Page|Page}}
+
* {{ScoutLink|Concepts|NodePage|Node Page}}
+
* {{ScoutLink|Concepts|Outline|Outline}}
+

Latest revision as of 05:24, 14 March 2024

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

Back to the top