cancel
Showing results for 
Search instead for 
Did you mean: 

Split App not showing detail view in mobile on clicking master record

amber_garg
Active Participant
0 Kudos

I am using sap.m.splitApp to display a master view and detail view. On clicking on a doc number in master view , it shows corresponding details in detail view. This functionality is working fine in desktop.

In mobile(normal android)) , it shows just the master view(as expected according to the functionality of splitapp). However when i click on the the document number , nothing happens. It doesnt show me detail view.

I have used  selectionChange event .

PS: Its working fine in desktops

I even tried to emulate the output in mobile using chrome browser of desktop , and once i resize the screen to small size , then on clicking the document number in master view , nothing happens (Same behaviour as its happening in mobile)

Amber

Accepted Solutions (1)

Accepted Solutions (1)

former_member183518
Active Participant
0 Kudos

Great that you've solved it yourself. But consider posting the solution instead of just marking it as an assumed answer.

amber_garg
Active Participant
0 Kudos

Yes . Actually for mobile , I had to write code for manually setting the view of the app to Detail View on clicking. In Desktop it was not required since both are the views are shown side by side . But in mobiles since only 1 view can be seen at a time , we need to write the code for navigation manually.

Similary I had to add a BACK navigation from Detail to Master view

Thanks

Amber

lalitha_p2
Explorer
0 Kudos

Hi Amber,

Can you share me the code for the above??

back button is visible on desktop view...but i don't need it on desktop...and only on mobile..

it will be useful if u could share me the code for device model.

amber_garg
Active Participant
0 Kudos

Hi Lalitha,

Please find the code below.  This is AfterRendering function of the controller (common controller for both the views) . The method isMasterShwon() returns a boolean . If true it means the screen is showing master view hence we are setting visibility false for logo and back button. (In case of desktop , this function will always return true because in desktop/laptops the spiltapp will always show master and detail view together . In case of mobiles , only one view will be shown at a time . Hope this helps


onAfterRendering: function() {

  if(sap.ui.getCore().byId("split_app").isMasterShown()){

       sap.ui.getCore().byId("Img_Dlogo").setVisible(false);

       sap.ui.getCore().byId("Btn_Bck").setVisible(false);

  }

  },

lalitha_p2
Explorer
0 Kudos

Thanks for your help Amber.

Let me try this:)

amber_garg
Active Participant
0 Kudos

Sure , let me know if you face any issue in that

Regards

Amber

Answers (1)

Answers (1)

amber_garg
Active Participant
0 Kudos

Solved it . Thanks anyways

Amber