Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating UI contributions on Handler switch in e4 application model

I have defined a command global to my e4 application, namely the add command. So, as you can see in my sample application model the command is to used throughout the application (1) and to the repsective handler to be activated on context switch to the resp. parts in (2) and (3).

Now what I am missing, is the possibility to update all UI contributions like (4) allocated to command (1) with the information such as in (2) add contact, and when switching to (3) add account.

What is the general recommended way to update all UI contributions of a command considering the actual context of the command (which handler is active etc.). In Eclipse 3.x we had something like the IElementUpdater which was taking care of doing the respective update.

Thanks for your hints! - Parallely discussed in Eclipse Forum

I worked on finding a solution, and have outlined the current state in my blog.

like image 620
col.panic Avatar asked Jul 06 '14 20:07

col.panic


1 Answers

You can inject IEventBroker in your class and below statement, this statement will check for all UI enablement in application

    eventBroker.send(UIEvents.REQUEST_ENABLEMENT_UPDATE_TOPIC, UIEvents.ALL_ELEMENT_ID);
like image 191
Shashwat Avatar answered Nov 06 '22 16:11

Shashwat