on 05-22-2014 3:00 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.