cancel
Showing results for 
Search instead for 
Did you mean: 

UI issues and cross domain issues

Former Member
0 Kudos

Copied from mail thread:

=============================================================

From: Tiwari, Vivek
Sent: Wednesday, October 31, 2012 1:45 AM
To: Volchok, Alex; Maimon, Amit
Cc: Kapoor, Amit; Gabbai, Tomer; Balakrishnan, Venkiteswaran; Vainer, Vitaly; Khalatov, Dmitry; Kidron, Maya; Shapira, Yotam
Subject: RE: Issues
Importance: High

Hello Amit,

Many thanks for such a fast reply.

Link to SAP UI in my domain is

https://serviceportalnwcp.netweaver.ondemand.com/serviceportal/resources/sap-ui-core.js

I can access the SAP UI5 lib on this path (you can check it too – its available to everyone I believe).

I am pasting the code where I have doubt - yellow’ing the text of doubt. Can you review it and let me know if this is how it should be?

·         Name of the sap UI5 project is “serviceportal” (which is SAP UI5 MVC project)

<ModulePrefs title="Service on demand portal">

      <Optional feature="content-rewrite">

      <Param name="exclude-url">https://serviceportalnwcp.netweaver.ondemand.com/serviceportal/resources/sap-ui-core.js</Param>

     </Optional>

    <!DOCTYPE HTML>

    <html>

           <head>

             <script id="sap-ui-bootstrap" type="text/javascript"

                src="https://serviceportalnwcp.netweaver.ondemand.com/portal/shindig/gadgets/proxy?container=default&refr..." data-sap-ui-theme="sap_goldreflection" data-sap-ui-libs="sap.ui.commons">

                jquery.sap.registermodulepath("serviceportal", gadgets.io.getproxyurl("https://serviceportalnwcp.netweaver.ondemand.com/serviceportal/"));

Once again thanks a lot!

Vivek

From: Volchok, Alex
Sent: Wednesday, October 31, 2012 1:29 AM
To: Tiwari, Vivek; Maimon, Amit
Cc: Kapoor, Amit; Gabbai, Tomer; Balakrishnan, Venkiteswaran; Vainer, Vitaly; Khalatov, Dmitry; Kidron, Maya; Shapira, Yotam
Subject: RE: Issues

Hi Vivek,

  1. 1.The  src to the sapui lib should go out using the proxy , should look like this:

-> https://yourdomain/portal/shindig/gadgets/proxy?container=default&refresh=3600&url=linktosapui.

*Replace the url param with the link to sapui.

*Replace your domain with your portal url.

                   <script id="sap-ui-bootstrap"

                           type="text/javascript"

                              src="https://yourdomain/portal/shindig/gadgets/proxy?container=default&refresh=3600&url=linktosapui"

                              data-sap-ui-theme="sap_goldreflection"

                              data-sap-ui-libs="sap.ui.commons">

  1. 2.Try to remove the Javascript cache work around if it is included.

Thanks,

Alex

From: Tiwari, Vivek
Sent: Wednesday 31 October 2012 09:49
To: Volchok, Alex; Maimon, Amit
Cc: Kapoor, Amit; Gabbai, Tomer; Balakrishnan, Venkiteswaran; Vainer, Vitaly; Khalatov, Dmitry; Kidron, Maya
Subject: Issues
Importance: High

Hello Alex and Amit,

I am sorry about the short notice on meeting earlier  - looks like you didn’t get the invite well in the time.

Anyways the issues that I am facing right now are –

1.       If I try to inject SAP UI5 libraries from local resource, as suggested by Alex, I get cross domain errors!

@Amit Maimon- according to what we discussed this should not be happening now when we are deploying it on the nwcp account created by you!

XMLHttpRequest cannot load https://serviceportalnwcp.netweaver.ondemand.com/serviceportal/resources/sap/ui/core/library-preload.... Origin https://cloudsandboxportal-demo.netweaver.ondemand.com is not allowed by Access-Control-Allow-Origin.

  

         OR if I try to use the feature from portal where you inject SAP UI5.

     

      

2.       I get the following error –

Uncaught Error: resource URL '/portal/resources/sap/ui/commons/?1351668807356messagebundle.properties' has unknown type (should be one of .properties,.hdbtextproperties)

I don’t get this error when I run the same html on tomcat (which will use my version of SAP UI5).  It looks like this is because of version mismatch (I am using 1.6.3).   We need to give the cross team demo tomorrow and due to these issues I could not get widgets running on portal.  Would appreciate a lot if someone could look into it.

I will be sending you the invite to look at this site (on nwcp) in a separate email.

You can see the Issue 1 in widget td1 inside Ticket Detail page of the site.

You can see the Issue 2 in widget tl4 inside Tickets page of the site.

Thanks,

Vivek

=============================================================

Accepted Solutions (0)

Answers (2)

Answers (2)

jeff_collier
Discoverer
0 Kudos

The 2nd error message is misleading. The error message is thrown by the Bundle function, which is used to open a resource bundle. That is, the error is not thrown when you register the path, but later in your code when you attempt to open a resource bundle file. Here is an example from the sample project:

var i18nModel = new sap.ui.model.resource.ResourceModel(

    {bundleUrl : [rootPath, mConfig.resourceBundle].join("/")}

);

If the mConfig variable or the resourceBundle property is not defined, then you will see Error Message #2 above. In this case, you can replace mConfig.resourceBundle with a literal string such as "i18n/messageBundle.properties" to test whether that is your issue.

Former Member
0 Kudos

If you are using Chrome for testing. This worked for me: