cancel
Showing results for 
Search instead for 
Did you mean: 

SAPui5 pass data between view navigation

Former Member
0 Kudos

Hi All,

I have creating a SAPUI5 Mobile Application. I have a Login View and a Details View

I am using a  SplitApp control and gets data from a ODATA in the Details view. In Login view, i am having a different URL and validate the username and password and sent to detailspage. I am passing data and fetching in detailsview using Event, but it is not getting updated in the page UI as the view create content method is already called in the beginning.

Can anyone help in getting the data from view1 controller to view2 page UI.

Thanks,

Divya

Accepted Solutions (0)

Answers (1)

Answers (1)

koolspy_ultimate
Active Contributor
0 Kudos

Hi Divya,

You need to set the context of Master page to the details page, so that the data from view1 controller will be passed to view2.

Refer sample code below.

In my master page i am having an select even.

In master controller, i used the below code

      onSelect: function (oEvt) {

          var context  = oEvt.getSource().getBindingContext();

            this.nav.to("Details", context);    

      },

So when the select an list item in view one, the details will be displayed in view2.

Regards,

Madhumahesh.

Former Member
0 Kudos

Hi,

Got it resolved. The issue was not with the data. It was with the way the views were getting called. I created a new view called as "App.view" and declared views in it.

Thanks for the response.

Thanks,

Divya