<?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: Does Web IDE FS functionality to run libraries from workspace only apply to controls? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743426#M210042</link>
    <description>&lt;P&gt;Hi Amiram, thanks so much for your help. I did already have a type definition in the library but I see your point about why the reference in the consuming app should be to the library itself. I was thinking of ui.model.FilterOperator and how we use that, but of course that is it's own resource. I've tried using that library reference but to no avail. I just get this message:&lt;/P&gt;
  &lt;P&gt;ui5loader-dbg.js:1404 Uncaught ReferenceError: &lt;STRONG&gt;Invalid left-hand side in assignment&lt;/STRONG&gt;&lt;BR /&gt; at eval (&amp;lt;anonymous&amp;gt;)&lt;BR /&gt; at execModule (ui5loader-dbg.js:1404)&lt;BR /&gt; at requireModule (ui5loader-dbg.js:1293)&lt;BR /&gt; at Object.requireSync (ui5loader-dbg.js:1817)&lt;BR /&gt; at Object.jQuery.sap.require (jquery.sap.global-dbg.js:1655)&lt;BR /&gt; at constructor.t.loadLibrary (Core-dbg.js:1728)&lt;BR /&gt; at I.loadLibrary (Interface-dbg.js:44)&lt;BR /&gt; at constructor.loadDependencies (Manifest-dbg.js:454)&lt;BR /&gt; at constructor.init (Manifest-dbg.js:554)&lt;BR /&gt; at U.C.init (ComponentMetadata-dbg.js:183)&lt;/P&gt;
  &lt;P&gt;As my library is called com.md.library I used the path 'com/md/library/library' but I still get the error. Even when I use "sap/m/library" I get the same error. The define in the Component.js of the consuming app looks like this:&lt;/P&gt;
  &lt;P&gt;sap.ui.define([&lt;BR /&gt; "sap/ui/core/UIComponent",&lt;BR /&gt; "sap/ui/Device",&lt;BR /&gt; "com/md/SimpleUI5/model/models",&lt;BR /&gt; "sap/m/library"&lt;BR /&gt; //"com/md/library/library"&lt;BR /&gt;], function (UIComponent, Device, models, library) {&lt;BR /&gt; "use strict";&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Aug 2018 03:46:56 GMT</pubDate>
    <dc:creator>MikeDoyle</dc:creator>
    <dc:date>2018-08-18T03:46:56Z</dc:date>
    <item>
      <title>Does Web IDE FS functionality to run libraries from workspace only apply to controls?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaq-p/743423</link>
      <description>&lt;P&gt;I was very excited to read &lt;SPAN class="mention-scrubbed"&gt;michal.keidar&lt;/SPAN&gt;'s blog:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://blogs.sap.com/2018/08/16/how-sap-web-ide-supports-development-of-sap-fiori-reusable-libraries/comment-page-1/#comment-433924" target="test_blank"&gt;https://blogs.sap.com/2018/08/16/how-sap-web-ide-supports-development-of-sap-fiori-reusable-libraries/comment-page-1/#comment-433924&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;I would very much like to run my apps from the workspace with re-use libraries also on the same workspace. I tried this out but it didn't seem to work and I would appreciate some help on why it didn't work. Here's what I did on the main workspace of my trial account (full stack Web IDE):&lt;/P&gt;
  &lt;P&gt;1) Create Simple UI5 application using template&lt;BR /&gt;2) Create library using template&lt;BR /&gt;3) In library.js add a type (new version like this: &lt;A href="https://answers.sap.com/storage/attachments/200304-libraryjs.txt"&gt;libraryjs.txt)&lt;/A&gt;&lt;BR /&gt;4) Using context menu on simple UI5 app add reference to the library. For reference manifest.json of simple UI5 app now looks like this:&lt;/P&gt;
  &lt;P&gt;"dependencies": {&lt;BR /&gt; "minUI5Version": "1.30.0",&lt;BR /&gt; "libs": {&lt;BR /&gt; "sap.ui.layout": {},&lt;BR /&gt; "sap.ui.core": {},&lt;BR /&gt; "sap.m": {},&lt;BR /&gt; "&lt;STRONG&gt;com.md.library&lt;/STRONG&gt;": {&lt;BR /&gt; "minVersion": "1.0.0"&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; },&lt;/P&gt;
  &lt;P&gt;5) Update Component.js so that the new type is required. Top of Component.js now looks like this:&lt;/P&gt;
  &lt;P&gt;sap.ui.define([&lt;BR /&gt; "sap/ui/core/UIComponent",&lt;BR /&gt; "sap/ui/Device",&lt;BR /&gt; "com/md/SimpleUI5/model/models",&lt;BR /&gt; &lt;STRONG&gt;"com/md/library/Test"&lt;/STRONG&gt;&lt;BR /&gt;], function (UIComponent, Device, models, &lt;STRONG&gt;Test&lt;/STRONG&gt;) {&lt;BR /&gt; "use strict";&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;6) Add run configuration exactly as per Michal's blog&lt;/P&gt;
  &lt;P&gt;What I get is this error:&lt;/P&gt;
  &lt;P&gt;Uncaught Error: failed to load&lt;/P&gt;
  &lt;P&gt;'com/md/library/Test.js' from ../../resources/com/md/library/Test.js: 404 - Not Found&lt;/P&gt;
  &lt;P&gt;I can also see a 404 on the network tab with the following url:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://webidetesting5986836-s0015276274trial.dispatcher.hanatrial.ondemand.com/resources/com/md/library/Test.js" target="test_blank"&gt;https://webidetesting5986836-s0015276274trial.dispatcher.hanatrial.ondemand.com/resources/com/md/library/Test.js&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;Have I missed something?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 06:40:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaq-p/743423</guid>
      <dc:creator>MikeDoyle</dc:creator>
      <dc:date>2018-08-17T06:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Does Web IDE FS functionality to run libraries from workspace only apply to controls?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743424#M210040</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;amiram.wingarten&lt;/SPAN&gt; - Can you please assist?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 07:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743424#M210040</guid>
      <dc:creator>michal_keidar</dc:creator>
      <dc:date>2018-08-17T07:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Does Web IDE FS functionality to run libraries from workspace only apply to controls?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743425#M210041</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;mike.doyle4&lt;/SPAN&gt;,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;A type is defined in the library.js file and not in a resources of its own. Since there is no resource there is nothing to load using sap.ui.deifne or jquery.sap.require.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;For example see the &lt;A href="https://github.com/SAP/openui5/search?q=CarouselArrowsPlacement&amp;amp;unscoped_q=CarouselArrowsPlacement"&gt;occurrences&lt;/A&gt; of the type CarouselArrowsPlacement in the sap.m library:&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;The type is set in the library.js and retrieved from anywhere else via the library instance.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;So in your case you are missing the definition of the type in your library.js file. Something like &lt;A href="https://github.com/SAP/openui5/blob/05acb91677245f49e5bd934fd5f79632a91832ce/src/sap.m/src/sap/m/library.js#L495-L515"&gt;this&lt;/A&gt;. Wherever you want to load the type in another resource you should do sap.ui.define to the library like &lt;A href="https://github.com/SAP/openui5/blob/906db0f01b46184d07ecb784dcf005a950398a8f/src/sap.m/src/sap/m/CarouselRenderer.js#L5"&gt;here&lt;/A&gt; and then you can get it from the library instance like &lt;A href="https://github.com/SAP/openui5/blob/906db0f01b46184d07ecb784dcf005a950398a8f/src/sap.m/src/sap/m/CarouselRenderer.js#L11"&gt;this&lt;/A&gt;.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Amiram&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 12:07:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743425#M210041</guid>
      <dc:creator>former_member426433</dc:creator>
      <dc:date>2018-08-17T12:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Does Web IDE FS functionality to run libraries from workspace only apply to controls?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743426#M210042</link>
      <description>&lt;P&gt;Hi Amiram, thanks so much for your help. I did already have a type definition in the library but I see your point about why the reference in the consuming app should be to the library itself. I was thinking of ui.model.FilterOperator and how we use that, but of course that is it's own resource. I've tried using that library reference but to no avail. I just get this message:&lt;/P&gt;
  &lt;P&gt;ui5loader-dbg.js:1404 Uncaught ReferenceError: &lt;STRONG&gt;Invalid left-hand side in assignment&lt;/STRONG&gt;&lt;BR /&gt; at eval (&amp;lt;anonymous&amp;gt;)&lt;BR /&gt; at execModule (ui5loader-dbg.js:1404)&lt;BR /&gt; at requireModule (ui5loader-dbg.js:1293)&lt;BR /&gt; at Object.requireSync (ui5loader-dbg.js:1817)&lt;BR /&gt; at Object.jQuery.sap.require (jquery.sap.global-dbg.js:1655)&lt;BR /&gt; at constructor.t.loadLibrary (Core-dbg.js:1728)&lt;BR /&gt; at I.loadLibrary (Interface-dbg.js:44)&lt;BR /&gt; at constructor.loadDependencies (Manifest-dbg.js:454)&lt;BR /&gt; at constructor.init (Manifest-dbg.js:554)&lt;BR /&gt; at U.C.init (ComponentMetadata-dbg.js:183)&lt;/P&gt;
  &lt;P&gt;As my library is called com.md.library I used the path 'com/md/library/library' but I still get the error. Even when I use "sap/m/library" I get the same error. The define in the Component.js of the consuming app looks like this:&lt;/P&gt;
  &lt;P&gt;sap.ui.define([&lt;BR /&gt; "sap/ui/core/UIComponent",&lt;BR /&gt; "sap/ui/Device",&lt;BR /&gt; "com/md/SimpleUI5/model/models",&lt;BR /&gt; "sap/m/library"&lt;BR /&gt; //"com/md/library/library"&lt;BR /&gt;], function (UIComponent, Device, models, library) {&lt;BR /&gt; "use strict";&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Aug 2018 03:46:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743426#M210042</guid>
      <dc:creator>MikeDoyle</dc:creator>
      <dc:date>2018-08-18T03:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Does Web IDE FS functionality to run libraries from workspace only apply to controls?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743427#M210043</link>
      <description>&lt;P&gt;This code in your library.js causes &lt;STRONG&gt;Invalid left-hand side in assignment&lt;/STRONG&gt;:&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;"com.md.library.Test" = {
			Greeting: "Hello"
		}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;The double quotes on com.md.library.Test are redundant.&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;Amiram&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Aug 2018 21:30:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743427#M210043</guid>
      <dc:creator>former_member426433</dc:creator>
      <dc:date>2018-08-19T21:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Does Web IDE FS functionality to run libraries from workspace only apply to controls?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743428#M210044</link>
      <description>&lt;P&gt;Thanks so much Amiram, I've got it working now. I'm planning to get much more used to writing my own libraries....&lt;/P&gt;</description>
      <pubDate>Sun, 26 Aug 2018 23:30:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-web-ide-fs-functionality-to-run-libraries-from-workspace-only-apply-to/qaa-p/743428#M210044</guid>
      <dc:creator>MikeDoyle</dc:creator>
      <dc:date>2018-08-26T23:30:53Z</dc:date>
    </item>
  </channel>
</rss>

