| No events received in 4.2.2 [message #1017022] |
Fri, 08 March 2013 11:48  |
Norman Wenzel Messages: 3 Registered: March 2013 |
Junior Member |
|
|
Hi,
since the update from 4.2.1 to 4.2.2 the Event Broker does not work anymore.
So when I send an event, it is not received with code like:
@Inject
@Optional
void myTopicHandler(final @UIEventTopic(EventTopic.MY_TOPIC) Project project) {
//handle event
}
Is this a bug or does the implementation changed in any (undocumented...) way? This is an absolut showstopper for our project.
Thanks
Norman
|
|
|
|
| Re: No events received in 4.2.2 [message #1017290 is a reply to message #1017189] |
Mon, 11 March 2013 09:46   |
Norman Wenzel Messages: 3 Registered: March 2013 |
Junior Member |
|
|
Hi Brian, thanks for your reply.
The problem is: I can't create a simple example!
I've tried to create a dummy project (the E4 example project created by the wizard), added the EventBroker code in the AboutHandler (just to keep it simple, of course this makes no sense ) - and everything works fine!
Then I moved exactly this code into the AboutHandler of our E4 application - and it DID NOT WORK!
So this seems to be no general problem, it has to be a configuration issue. Is there something in 4.2.2 that is (additionally) required to enable the event service?
I debugged the code and found out that everything is okay until UIEventObjectSupplier is reached. Here the injected UISynchronize object is null and so the requestor is not executed. Do you have any idea what could cause this behavior?
[Updated on: Mon, 11 March 2013 09:47] Report message to a moderator
|
|
|
|
| Re: No events received in 4.2.2 [message #1017319 is a reply to message #1017299] |
Mon, 11 March 2013 11:13  |
Norman Wenzel Messages: 3 Registered: March 2013 |
Junior Member |
|
|
I do not inject a dialog. For the sample code I do it just as simple as possible:
public class AboutHandler {
public static final String TOPIC = "about";
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
IEventBroker eventBroker) {
MessageDialog dialog = new MessageDialog(shell, "title", null,
"Message", MessageDialog.INFORMATION, new String[] { "OK" }, 0);
eventBroker.post(TOPIC, dialog);
}
@Inject
@Optional
void projectParsedHandler(final @UIEventTopic(TOPIC) MessageDialog dialog) {
dialog.open();
}
}
The member variable uiSync of the event broker is initialized (from the E4Application, just as you said). But in UIEventObjectSupplier (called by the EventManager) it is not.
|
|
|
Powered by
FUDForum. Page generated in 0.01639 seconds