Skip to Content
avatar image
Former Member

How to improve my SplitApp in mobile?

Hi!

Could you tell me how can I improve communication between pages in SplitApp in Smartphone?

I want that in Phone View I could see only list in Master Page. If someone choose item, he gets for example only this "Zusammenfassung".

How can I do it?

Right now I have something like this.

I wan to get this

Thank you in advance!

Regards,

Khristina

app.png (33.6 kB)
app1.png (61.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 09, 2016 at 04:14 PM

    Hi Khristina,

    could you provide some more technical informations like controller source code of master view and/or the manifest.json to get a deeper look how you implemented the routes, targets and navigation between master and detail views.

    Add comment
    10|10000 characters needed characters exceeded

    • We use the split app template from webide for this use case. It attaches a PatternMatched callback function to the master route in the onInit lifecycle function of master controller. When this event got fired the callback function looks if there are objects loaded into the masterlist and decides upon this to load the detail view with first loaded object bound to it. If there was no objects loaded into masterlist at onInit the callback function load the noObjectsAvailable view and displays it.

      sap.ui.define([...]) {
        ...
      
        onInit: function() {
        ...
        this.getRouter().getRoute("master").attachPatternMatched(this._onMasterMatched, this);
        ...
      
        },
      
        _onMasterMatched: function() {
          this._oListSelector.oWhenListLoadingIsDone.then(
            function(mParams) {
              if (mParams.list.getMode() === "None") {
                return;
      	}
      	this.getModel("appView").setProperty("/addEnabled", true);
      	if (!mParams.list.getSelectedItem()) {
      	  this.getRouter().navTo("object", {
      	    ObjectId: encodeURIComponent(mParams.firstListitem.getBindingContext().getProperty("ObjectId"))
      	  }, true);
      	}
            }.bind(this),
            function(mParams) {
      	if (mParams.error) {
      	  return;
      	}
      	this.getRouter().getTargets().display("detailNoObjectsAvailable");
            }.bind(this)
      	);
        },
      
      }
  • Nov 09, 2016 at 05:44 PM

    try to set mode of splitapp as:

    ShowHideMode or StretchCompressMode

    and if in mobile device- you want third IconTabFilter get selected by default, Then-

    define key property for each IconTabFilter in xml, and then initially just check the device using sap.ui.Device.system and set the key of that particular IconTabFilter using setSelectedKey

    Regards,

    Akhilesh

    Add comment
    10|10000 characters needed characters exceeded