Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » how to set contents for different instances of the same view
how to set contents for different instances of the same view [message #645919] Tue, 21 December 2010 03:18 Go to next message
xl  is currently offline xl
Messages: 1
Registered: December 2010
Junior Member
hello,all.
i'm working on a multi-instance view, and want to set different contents for different instances of the view.
i know how to open multi-instance view by using showView() method. but i am quite lost when i try to set contents for the newly opened view... e.g. each instance view would, in the tableviewer, display different classes of students' information...
can anybody please help me out here.detailed description would be much helpful since i'm new programming on rcp... big thx.
Re: how to set contents for different instances of the same view [message #647473 is a reply to message #645919] Thu, 06 January 2011 10:20 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

The most common solution to this usecase is to have an
InformationManager (maybe in your plugin, or as a service). When you
open your view with a secondary ID, that acts as a key that allows your
view to retrieve the appropriate data source from your InformationManager.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:overridden method with generic method not found in search
Next Topic:AIX (PPC64/GTK 2) is for AIX 64bit OS? - please help
Goto Forum:
  


Current Time: Sat Jul 26 11:19:15 EDT 2014

Powered by FUDForum. Page generated in 0.02134 seconds