Skip to Content
Technical Articles
Author's profile photo Madhusudan H

Master Detail Binding using EventBus in SAP UI5


I had a requirement where on events of View1 I wanted to make some changes in View 2 in Master-Detail page with Nested Views.



  1. Multiple people can work on same project without facing any issue while merging.
  2. Code is segregate which helps in reducing complexity of program.
  3. Individual view can be used as a plugin.


Note :

Here I have created 3 Views one for SplitApp and remaining two views I made it as nested view inside the SplitApp as Master View and Detail View.


Step 1: Create one main view as SplitApp follow the as shown in the image


sample of nested view in SplitApp


Master View


Master View

Detail View


Detail View


Invoking methods of Detail view controller for event occurring in Master View

As per my Requirement this can be achieved by different ways but still will implement it by EventBus

Event Bus is publisher/subscriber design pattern. There will be 2 events one will be a publisher and another will be subscriber.Publisher : This is event which gets triggered on any event of same view.Subscriber: This is event which gets triggered on any event of another View.


Code for Master controller  (Publish method)


Publish Method

Code for Detail controller (Subscribe method)


Subscribe method


Once event is triggered in Master view (publish) an event will be published. All the subscriber (Detail view) events will be triggered (subscribe).


Step 2:

Create model with data and configure it in manifest.json file


            "Designation":"Singing and Dancing"
            "Designation":"Test Engineer"
            "Designation":"System Engineer"






Final Output





Finally, we done. The same approach can be implement it by in different ways. nested views in master detail with EventBus is one more way. At the same time of event occurring you can pass multiple data as channels as user requirement.

Hope I find this helpful.


Thanks and Regards


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Jun Wu
      Jun Wu
      1. I don't understand the mentioned advantage have any relevance here
      2. you should use component's event bus, not core's
      Author's profile photo Simon Coen
      Simon Coen

      Agree! I can only add that the described use-case looks constructed. When you want to display specific data on the detailView depending on a selected item of the MasterView just use the Router.