<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Split App throws getBindingContext(...) is undefined in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724871#M201459</link>
    <description>&lt;P&gt;About the /SRV - for some reason, it's needed while I'm using the local IDE, but I have to remove it manually before deploying the app, and the communication between app and OData works fine (it reads, puts and updates data without a  problem).&lt;BR /&gt;The &lt;EM&gt;mParams.firstListitem &lt;/EM&gt;seems to be wrong since it's &lt;EM&gt;oModels&lt;/EM&gt; and &lt;EM&gt;oBindingContexts&lt;/EM&gt; are empty objects.&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Oct 2018 12:46:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-10-26T12:46:54Z</dc:date>
    <item>
      <title>Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaq-p/724865</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I'm creating a simple Split App using a template.&lt;BR /&gt;Because of the OData service specification, I had to make some changes to the manifest file and in the master.controller as well.&lt;BR /&gt;While starting the app I'm receiving&lt;BR /&gt;&lt;EM&gt;TypeError: mParams.firstListitem.getBindingContext(...) is undefined&lt;BR /&gt;&lt;/EM&gt;In the console.&lt;BR /&gt;What am I doing wrong and how to repair this bug?&lt;BR /&gt;The manifest file and other parts of the app are good because the navigation works fine if I click anything on Master list, but it can't show first list element details by default.&lt;BR /&gt;Here is the code of problematic functions:&lt;BR /&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;onInit: function() {
            var oList = this.byId("list"),
                oViewModel = this._createViewModel(),
                iOriginalBusyDelay = oList.getBusyIndicatorDelay();

            this._oList = oList;
            this._oListFilterState = {
                aFilter: [],
                aSearch: []
            };

            this.setModel(oViewModel, "masterView");
            oList.attachEventOnce("updateFinished", function() {
                oViewModel.setProperty("/delay", iOriginalBusyDelay);
            });

            this.getView().addEventDelegate({
                onBeforeFirstShow: function() {
                    this.getOwnerComponent().oListSelector.setBoundMasterList(oList);
                }.bind(this)
            });
            this.getRouter().getRoute("master").attachPatternMatched(this._onMasterMatched, this);
            this.getRouter().attachBypassed(this.onBypassed, this);
        },

_onMasterMatched: function() {
            
            this.getOwnerComponent().oListSelector.oWhenListLoadingIsDone.then(
                function(mParams) {
                    if (mParams.list.getMode() === "None") {
                        return;
                    }
                    
                    var sObjectId = mParams.firstListitem.getBindingContext().getProperty("Bukrs");
                    var sObjectId2 = mParams.firstListitem.getBindingContext().getProperty("Auditid");
                    var sObjectId3 = mParams.firstListitem.getBindingContext().getProperty("Commiteeid");
                    this.getRouter().navTo("object", {
                        objectId: sObjectId,
                        objectId2: sObjectId2,
                        objectId3: sObjectId3
                    }, true);
                }.bind(this),
                function(mParams) {
                    if (mParams.error) {
                        return;
                    }
                    this.getRouter().getTargets().display("detailNoObjectsAvailable");
                }.bind(this)
            );
        },&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Oct 2018 09:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaq-p/724865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-26T09:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724866#M201454</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/374461/barpio.html"&gt;Bartosz&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;if your List is bound to "masterView" Model, you have to call mParams.firstListitem.getBindingContext("masterView").getProperty("Bukrs")&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Christian.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 09:51:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724866#M201454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-26T09:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724867#M201455</link>
      <description>&lt;P&gt;Did you give your ODATA model a name inside of your manifest? Or change the named model of the master list?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;So for example, If I have an ODATA service called "myService" It would be .&lt;/EM&gt;&lt;EM&gt;getBindingContext("myService") and the same applies to a differntly named model for your master list.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 09:54:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724867#M201455</guid>
      <dc:creator>former_member593055</dc:creator>
      <dc:date>2018-10-26T09:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724868#M201456</link>
      <description>&lt;P&gt;Thanks for your reply, but after changing to&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var sObjectId = mParams.firstListitem.getBindingContext("masterView").getProperty("Bukrs");&lt;BR /&gt;&lt;/EM&gt;There is still the same behaviour and the same error in the console.&lt;BR /&gt;Of course, I've changed all three &lt;EM&gt;getBindingContext&lt;/EM&gt; parts accordingly.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 10:24:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724868#M201456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-26T10:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724869#M201457</link>
      <description>&lt;P&gt;This is from the &lt;EM&gt;manifest&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"dataSources": {
            "mainService": {
                "uri": "/SRV/sap/opu/odata/PRJ/PRJ_SRV/",
                "type": "OData",
                "settings": {
                    "odataVersion": "2.0",
                    "localUri": "localService/metadata.xml"
                }
            }
        },&lt;BR /&gt;&lt;BR /&gt;"models": {
            "i18n": {
                "type": "sap.ui.model.resource.ResourceModel",
                "settings": {
                    "bundleName": "prj.i18n.i18n"
                }
            },
            "": {
                "dataSource": "mainService",
                "preload": true,
                "settings": {
                    "defaultBindingMode": "TwoWay"
                }
            }
        },&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Oct 2018 10:51:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724869#M201457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-26T10:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724870#M201458</link>
      <description>&lt;P&gt;I have never seen an URI beginning with "/SRV". All our URIs start with "/sap/opu/odata/".&lt;/P&gt;&lt;P&gt;But I do not think, that this is problem, because all communication to the ODataService should cause errors in this case. But to be sure, can you verifiy in the network pane of the debugger tools of your browser, that i.e. metadata of your odata service is loaded.&lt;/P&gt;&lt;P&gt;If metadata is loaded, you can take a deeper look inside mParams.firstListitem. Is this the right object? Who assigned it to mParams?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 11:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724870#M201458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-26T11:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724871#M201459</link>
      <description>&lt;P&gt;About the /SRV - for some reason, it's needed while I'm using the local IDE, but I have to remove it manually before deploying the app, and the communication between app and OData works fine (it reads, puts and updates data without a  problem).&lt;BR /&gt;The &lt;EM&gt;mParams.firstListitem &lt;/EM&gt;seems to be wrong since it's &lt;EM&gt;oModels&lt;/EM&gt; and &lt;EM&gt;oBindingContexts&lt;/EM&gt; are empty objects.&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 12:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724871#M201459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-10-26T12:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724872#M201460</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;you need show a bit more information about this piece, this.getOwnerComponent().oListSelector.oWhenListLoadingIsDone.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Oct 2018 16:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724872#M201460</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2018-10-27T16:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Split App throws getBindingContext(...) is undefined</title>
      <link>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724873#M201461</link>
      <description>&lt;P&gt;After removing &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;,group : true&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;from the&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;List items="{ path: '/CommitteeSet', sorter: { path: 'Auditid', descending: false} }"[...]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in Master.view.xml the error stopped appearing.&lt;BR /&gt;Why does grouping have an impact on that? &lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 08:37:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/split-app-throws-getbindingcontext-is-undefined/qaa-p/724873#M201461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-11-07T08:37:38Z</dc:date>
    </item>
  </channel>
</rss>

