Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to use untyped events in RAP
icon4.gif  How to use untyped events in RAP [message #777321] Tue, 10 January 2012 09:22
ZungNV Abel is currently offline ZungNV AbelFriend
Messages: 16
Registered: November 2010
Junior Member
I'm developing an application based on RCP.Recently, I have moved it to RAP. Before, I used some untyped events in RCP to pass some necessary data for different purposes. For example, I have a button called "Get Data" to get data from server. I have some tableviewer to hold data that were received from server.When user click this button, I want to raise an event, and in each table will listen that event. I did as following:

//Part 1
Button btgetData=new Button(compositeLabels,SWT.PUSH);
        btgetData.setText("Get Data");
        btgetData.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                //raise event here
                Event event =new Event();
            getRoot().getShell().notifyListeners(MYEVENTCONST, event);

//Part 2: 
//In each composite that hold TableViewer , listen event

getShell().addListener(MYEVENTCONST, new Listener() 
            public void handleEvent(Event event) {

In RCP, each TableViewer listen normally that event each time user click button "Get Data". But it didn't work on RAP, I don't know if RAP already supported this kind of untyped events. THe fucntion doProcessing() is never called Sad.

I don't want to change the way when passing data. Please let me know if I could keep going in the old way. I greatly appreciate for any comment.
Previous Topic:Error "Unable to create perspective" when run deployed RAP application
Next Topic:How to use untyped events in RAP
Goto Forum:

Current Time: Mon May 29 05:48:49 GMT 2023

Powered by FUDForum. Page generated in 0.01777 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top