Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Transfering data between views and action(Transfering data between views and action)
Transfering data between views and action [message #635253] Tue, 26 October 2010 04:05 Go to next message
FB Missing name is currently offline FB Missing name
Messages: 7
Registered: October 2010
Junior Member
Hi,

I have two views, first one with a text field multi-line.

second view is the ouput view with a text field too.

i have a button in the coolbar, how can i get data inside the text fied of the first view to launch my process and put result into the textfield of the output view when i click the button ?

Thanks.
Sophia
Re: Transfering data between views and action [message #635339 is a reply to message #635253] Tue, 26 October 2010 09:42 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You can use IWorkbenchPage and findViewReference(id) to find one view
from another.

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


Re: Transfering data between views and action [message #635596 is a reply to message #635339] Wed, 27 October 2010 09:20 Go to previous messageGo to next message
FB Missing name is currently offline FB Missing name
Messages: 7
Registered: October 2010
Junior Member

Thank you, I can get the view, but my questions was : how can i access the text field data inside this view ?

By the way, what is the best practice to do that ?
Thanks

Sophia
Re: Transfering data between views and action [message #635604 is a reply to message #635596] Wed, 27 October 2010 09:36 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

For your own views, you can check and cast (to a common interface or
concrete, since you own them).

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:sticky view
Next Topic:Good practices with selection listeners
Goto Forum:
  


Current Time: Wed Aug 20 18:32:45 EDT 2014

Powered by FUDForum. Page generated in 0.01583 seconds