Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » @UIEventTopic parameter?
@UIEventTopic parameter? [message #696667] Thu, 14 July 2011 10:31 Go to next message
Eclipse UserFriend
Hi

I'm trying to understand how could I use the annotation

I could subscribe to some event using this approach:
		eventBroker.subscribe(UIEvents.buildTopic(UIEvents.UIElement.TOPIC,
				UIEvents.UIElement.WIDGET), ev5);

and that is working properly and I always receive a Event object in 'ev5' handler.

Now I'm trying to do the same using UIEventTopic annotation. I've used this:
@Inject
	void processWindowEvents(
			@Optional @UIEventTopic(UIEvents.UIElement.TOPIC) Object event) {
		System.out.println(event);

	}


Its not seem to be working. It is being called once, but I think by the DI and the event parameter is always null.

I'm doing the right thing?

thanks

Cristiano
Re: @UIEventTopic parameter? [message #698432 is a reply to message #696667] Tue, 19 July 2011 09:12 Go to previous message
Eclipse UserFriend
Look at UIEvents.buildTopic(*) You need to use a string that's equivalent to what buildTopic(*) returns in your @UIEventTopic(string_topic).


PW
Previous Topic:Use of 3.x plugins in e4
Next Topic:Please help me evaluate e4 for my application
Goto Forum:
  


Current Time: Wed Jul 09 08:39:58 EDT 2025

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

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

Back to the top