java - How to send values from one view to other View in eclipse e4? -


i using pure eclipse e4 application. have created 1 handler , 2 parts. using handler selected files , displayed in 1 of part "part a". part has tableviewer checkboxes. after selecting particular files table viewer checkbox , need calculate values selected files , display them in kind of graph in second part part b. need selected files in part b can process files , using jfreechart can display chart in part b.

my question how pass values part part b?

you can use e4 event broker this.

in part wants send events inject event broker:

@inject private ieventbroker eventbroker;  

to send data asynchronously use:

eventbroker.post("base_topic/data_event", data);  

to send synchronously use:

eventbroker.send("base_topic/data_event", data);  

in part wants receive data use:

@inject @optional void dataevent(@eventtopic("base_topic/data_event") datatype data)  

if want data received on ui thread use @uieventtopic instead of @eventtopic.

the event topic names decide on, have used example here.

note: since uses injection code must in mpart class (or must injection yourself).

more details here


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -