Jump to: navigation, search

Difference between revisions of "Scout/Concepts/TablePage"

(Description)
(Events: add child page and virtual child page)
Line 29: Line 29:
 
== Events ==
 
== Events ==
 
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
 
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
{{note|TODO|Add a description of the more important event and a list of the other events (grouped by type)}}
 
  
{{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.
+
=== 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 ==
 
== See Also ==

Revision as of 07:28, 8 February 2013


Scout
Wiki Home
Website
DownloadGit
Community
ForumsBlogTwitter
Bugzilla
Bugzilla


Table-oriented page

  • implements: I obj.pngIPageWithTable
  • extends: C obj.pngAbstractPageWithTable


Description

Note.png
TODO
Add a description

HG TablePage.png

Summary Cell

Note.png
TODO
Merge this post: Summary Cell. It explain how the summary cell is used to represent the child pages in the page tree.


Screenshot

ScoutScreenshotTablePage.png


Properties

Defined with getConfiguredXxxxxx() methods.

Note.png
TODO
Add a description of the more important properties (ore the properties specific to this element)


Events

Defined with execXxxxxx() methods.

child page and virtual child page

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.

@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;
}

For performance reason, because sometimes instantiating a page can be expansive, the concept of virtual page was introduced. Virtual pages are created by CreateVirtualChildPage. Virtual pages act like a proxy: only when they are activated the real corresponding page is instanciated with the corresponding call to CreateChildPage.

Note.png
TODO
If virtual page are not handled properly you can see two kinds of bugs: TODO: Document these cases here.


Other events

Note.png
TODO
Add a description of the more important event and a list of the other events (grouped by type)


See Also