<?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: Flexible Programming Model table failed to load in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/flexible-programming-model-table-failed-to-load/qaa-p/12700463#M4765601</link>
    <description>&lt;P&gt;Hello Matt,&lt;/P&gt;&lt;P&gt;When loading FE building blocks within fragment you need to do that using the loadFragment method available in the extension API &lt;A href="https://sapui5.hana.ondemand.com/#/api/sap.fe.core.ExtensionAPI%23methods/loadFragment" target="test_blank"&gt;https://sapui5.hana.ondemand.com/#/api/sap.fe.core.ExtensionAPI%23methods/loadFragment&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Nicolas&lt;/P&gt;</description>
    <pubDate>Wed, 12 Apr 2023 08:50:16 GMT</pubDate>
    <dc:creator>nicolas_lunet</dc:creator>
    <dc:date>2023-04-12T08:50:16Z</dc:date>
    <item>
      <title>Flexible Programming Model table failed to load</title>
      <link>https://community.sap.com/t5/technology-q-a/flexible-programming-model-table-failed-to-load/qaq-p/12700462</link>
      <description>&lt;P&gt;I'm trying to use the Fiori Elements table building block in a freestyle app. The table is part of an XML fragment that gets dynamically loaded. Here's the gist of the fragment:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&amp;lt;core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:macros="sap.fe.macros"&amp;gt;...&amp;lt;macros:Table id="idTable" metaPath="association/@com.sap.vocabularies.UI.v1.LineItem" selectionMode="Multi" readOnly="true"/&amp;gt;...&amp;lt;/core:FragmentDefinition&amp;gt; 
  &lt;P&gt;When I load this fragment, I end up receiving this error message in the console, and the page stops loading:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;Uncaught (in promise) ModuleError: failed to load 'sap/fe/macros/Table.js' from ../resources/sap/fe/macros/Table.js: script load error
    at se (https://port8080-workspaces-ws-45mg4.eu10.applicationstudio.cloud.sap/resources/sap-ui-core.js:10:7148)
    at ne.failWith (https://port8080-workspaces-ws-45mg4.eu10.applicationstudio.cloud.sap/resources/sap-ui-core.js:10:4989)
    at HTMLScriptElement.i (https://port8080-workspaces-ws-45mg4.eu10.applicationstudio.cloud.sap/resources/sap-ui-core.js:10:10946)
Caused by: Error: script load error
    at HTMLScriptElement.i (https://port8080-workspaces-ws-45mg4.eu10.applicationstudio.cloud.sap/resources/sap-ui-core.js:10:10988)&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;At the time of the fragment load, it does appear that the resource is already loaded:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2158813-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Any ideas what I might be missing?&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 15:32:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/flexible-programming-model-table-failed-to-load/qaq-p/12700462</guid>
      <dc:creator>MattDion</dc:creator>
      <dc:date>2023-04-08T15:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Flexible Programming Model table failed to load</title>
      <link>https://community.sap.com/t5/technology-q-a/flexible-programming-model-table-failed-to-load/qaa-p/12700463#M4765601</link>
      <description>&lt;P&gt;Hello Matt,&lt;/P&gt;&lt;P&gt;When loading FE building blocks within fragment you need to do that using the loadFragment method available in the extension API &lt;A href="https://sapui5.hana.ondemand.com/#/api/sap.fe.core.ExtensionAPI%23methods/loadFragment" target="test_blank"&gt;https://sapui5.hana.ondemand.com/#/api/sap.fe.core.ExtensionAPI%23methods/loadFragment&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Nicolas&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 08:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/flexible-programming-model-table-failed-to-load/qaa-p/12700463#M4765601</guid>
      <dc:creator>nicolas_lunet</dc:creator>
      <dc:date>2023-04-12T08:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Flexible Programming Model table failed to load</title>
      <link>https://community.sap.com/t5/technology-q-a/flexible-programming-model-table-failed-to-load/qaa-p/12700464#M4765602</link>
      <description>&lt;P&gt;Thank you Nicolas! That did the trick. I was trying to use sap.ui.core.Fragment to load the XML fragment.&lt;/P&gt;&lt;P&gt;The correct coding is more or less (from the FPM context in a page controller extension class):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;this.getExtensionAPI().loadFragment({
                id: "idFragment",
                name: "&amp;lt;name of fragment&amp;gt;",
                controller: this,
                initialBindingContext: this.getBindingContext()
            }).then(function (oFragment) { });

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Apr 2023 15:22:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/flexible-programming-model-table-failed-to-load/qaa-p/12700464#M4765602</guid>
      <dc:creator>MattDion</dc:creator>
      <dc:date>2023-04-12T15:22:20Z</dc:date>
    </item>
  </channel>
</rss>

