cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5:Error-failed to load sap.ui.layout.form.library!!

Former Member
0 Kudos

Hi Experts,

I am getting this error message when I have already added the path of the library in the HTML page.

I am trying to execute the examples from SAPUI5 SDK - Demo Kit but the examples which talk about ResponsiveLayout,ResponsiveGridLayout and ResponsiveFlowLayout are not working.

There is a problem with loading of one library as per the error message.

Error message-

SCRIPT5022: failed to load 'sap.ui.layout.form.library' from /sapui5/resources/sap/ui/layout/form/library.js: 404 - Not Found.

I am working on SAP MII 14.0 SP4 and the version of IE is 9.

Any pointers will be helpful.

Regards,

Muddassar Khan

Accepted Solutions (1)

Accepted Solutions (1)

Private_Member_14935
Active Participant
0 Kudos

Hi Muddassar,

As mentioned by Christian you could check the SAP UI5 version you are on to confirm if those libraries are part of it.

For checking the version, you can press F12 which opens up browser console and type in the following:

sap.ui.version

Additionally can you share the exact code that you are trying.

Does it throw js error at this line: var oLayout1 = new sap.ui.layout.form.ResponsiveLayout("L1");

Regards,

Ria

Former Member
0 Kudos

Hi Ria,

The output of sap.ui.version-1.14.0

Yes,it does throw js error on the line var oLayout1 = new sap.ui.layout.form.ResponsiveLayout("L1");

Additionally,the full code of the example which I was trying is pasted below-

<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>ResponsiveLayoutExample</TITLE>
<META http-equiv="X-UA-Compatible" content="IE=edge">
<META http-equiv='cache-control' content='no-cache'>
<META http-equiv='expires' content='0'>
<META http-equiv='pragma' content='no-cache'>
<SCRIPT id="sap-ui-bootstrap" type="text/javascript"
    src="/sapui5/resources/sap-ui-core.js"
   data-sap-ui-theme="sap_goldreflection" 
   data-sap-ui-libs="sap.ui.ux3,sap.ui.commons,sap.ui.layout.form,sap.ui.table">
</SCRIPT>


<SCRIPT>

  var oLayout1 = new sap.ui.layout.form.ResponsiveLayout("L1");

  var oForm1 = new sap.ui.layout.form.Form("F1",{
   title: new sap.ui.core.Title({text: "Address Data", icon: "../../commons/demokit/images/address.gif", tooltip: "Title tooltip"}),
   layout: oLayout1,
   formContainers: [
    new sap.ui.layout.form.FormContainer("F1C1",{
     title: "Person data",
     formElements: [
      new sap.ui.layout.form.FormElement({
       label: "Name",
       fields: [new sap.ui.commons.TextField({value: "Max"}),
         new sap.ui.commons.TextField({value: "Mustermann"})
       ]
      }),
      new sap.ui.layout.form.FormElement({
       label: "Date of Birth",
       fields: [new sap.ui.commons.DatePicker({yyyymmdd: "19990909", layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({weight: 2})})
       ],
       layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({linebreak: true, margin: false})
      })
      ]
    }),
    new sap.ui.layout.form.FormContainer("F1C2",{
     title: "address",
     formElements: [
      new sap.ui.layout.form.FormElement({
       label: "Street / Number",
       fields: [new sap.ui.commons.TextField(),
         new sap.ui.commons.TextField({width: "3em"})
       ]
      }),
      new sap.ui.layout.form.FormElement({
       label: "Zip Code / City",
       fields: [new sap.ui.commons.TextField(),
         new sap.ui.commons.TextField()
       ],
       layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({linebreak: true, margin: false})
      }),
      new sap.ui.layout.form.FormElement({
       label: "Country",
       fields: [new sap.ui.commons.TextField({layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({weight: 2})})
       ]
      })
      ]
    }),
    new sap.ui.layout.form.FormContainer("F1C3",{
     title: "contact",
     formElements: [
      new sap.ui.layout.form.FormElement({
       label: "Phone Number",
       fields: [new sap.ui.commons.TextField()
       ],
       layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({linebreak: true, margin: false})
      }),
      new sap.ui.layout.form.FormElement({
       label: "Mobile",
       fields: [new sap.ui.commons.TextField()
       ],
       layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({linebreak: true, margin: false})
      }),
      new sap.ui.layout.form.FormElement({
       label: "Email",
       fields: [new sap.ui.commons.TextField()
       ],
       layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({linebreak: true, margin: false})
      })
     ]
    })
   ]
  });

  oForm1.placeAt("sample1");
 
</SCRIPT>
</HEAD>
<BODY>

  <DIV id='sample1'> </DIV>
</BODY>
</HTML>

---------------------------------------------------------------------------------------------------------------------------------

Regards,

Muddassar

Private_Member_14935
Active Participant
0 Kudos

Hi Mudassar,

The libraries you are referring to is not available in 1.14.0, please upgrade SAP UI5 version to 1.16.X or above. I testes, it should work fine for you.

Regards,

Ria

Former Member
0 Kudos

Thanks Ria for the information.

Could you please help me in knowing as how can I upgrade the version of SAP UI5 to 1.16.X?

Regards,

Muddassar

Former Member
0 Kudos

Hi Ria,

In addition to the above query,I would also like to know the method by which I can know that what all libraries are there in version 1.14.0.

As we can see the list of all library files in the eclipse after importing the SAPUI5 Plug-in so is there any way that gives us the list of all the available libraries which are there in SAP MII 14.0 and belong to SAPUI5 1.14.0.

Basically how anyone can see the list of libraries whenMII  Workbench is used instead of eclipse?

Regards,

Muddassar

Private_Member_14935
Active Participant
0 Kudos

Hi Mudassar,

You could do this to list the loaded modules for a particular SAP UI5 library that you are referring to.

Press the following keys "Ctrl Alt Shift P" with the UI5 content loaded in your browser window:

This should open up a dialog as shown in the below screenshot:

Hope this helps!

Regards,

Ria

Former Member
0 Kudos

Hi Ria,

Thanks for the above steps.It did really help us in knowing the version.

Could you please let me know the answer of the subsequent question-

How can we get the latest SAPUI library?Is it available in the Market Place?

Thanks,

Muddassar

Private_Member_14935
Active Participant
0 Kudos

Hi Mudassar,

Glad that it helped. And yes, the latest SAP UI5 library is available in the market place.

Regards,

Ria

Former Member
0 Kudos

Thanks a lot Ria.You have been a great help.

Looking forward to much more discussions in future.

Regards,

Muddassar

Answers (1)

Answers (1)

former_member185280
Active Contributor
0 Kudos

Just a guess but It might be that those libraries aren't present in the UI5 version you are on. Right now the UI5 api is pretty fluid and it seems like they are adding and moving stuff around pretty often.