on ‎2024 Aug 19 1:57 PM
Hi all,
I'm experiencing an issue with loading a component in my SAPUI5 application. The error message I'm seeing is:
"Failed to load component for container - ModuleError: failed to load 'employeeapplication/SharedBlocks/PersonalDetails.js' from ./SharedBlocks/PersonalDetails.js: script load error"
My manifest.json file looks like this:
And my PersonalDetails.js file looks like this:
sap.ui.define([
"sap/ui/core/UIComponent"
], function(UIComponent) {
"use strict";
return UIComponent.extend("employeeapplication.SharedBlocks.PersonalDetails", {
metadata: {
properties: {
// your properties here
}
},
init: function() {
// your initialization code here
}
});
});
error in console I am facing .
Request clarification before answering.
"Thanks for asking! I'm trying to load a component in my SAPUI5 application, but I'm running into an error. I've posted my manifest.json and PersonalDetails.js code above, but I forgot to include the XML code. Let me add that in.
pnl.view.xml
<mvc:View xmlns:form="sap.ui.layout.form" controllerName="employeeapplication.controller.pnl"
xmlns:personal="employeeapplication.SharedBlocks.PersonalDetails"
>
<ObjectPageSection id="_IDGenObjectPageSection235" titleUppercase="false" title="Finance Project Details">
<subSections>
<ObjectPageSubSection id="financeDetailsId8" titleUppercase="false" >
<blocks>
<personal:PersonalDetails id="_IDGenPersonalDetails1"/>
</blocks>
</ObjectPageSubSection>
</subSections>
</ObjectPageSection>
sharedBlocks/personalDetails/PersonalDetails.view.xml
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns:forms="sap.ui.layout.form" xmlns="sap.m">
<form:SimpleForm id="_IDGenSimpleForm131"
editable="false"
layout="ResponsiveGridLayout"
labelSpanL="1"
labelSpanM="2"
emptySpanL="0"
emptySpanM="0"
columnsL="0"
columnsM="0">
<form:content>
<m:Label id="_IDGenLabe132" text="Employee Id" />
<m:Input id="_IDGenText1213" value="{Empid}" enabled="false" />
<m:Label id="_IDGenLabel231" text="Currency" />
<m:Input id="_IDGenText11223" value="{Curr}" enabled="false" />
<m:Label id="_IDGenLabe1243" text="CTC" />
<m:Input id="_IDGenText11233" value="{Ctc}" enabled="false" />
<m:Label id="_IDGenLabel2231" text="Gross Salary " />
<m:Input id="_IDGenText112231" value="{GrossSal}" enabled="false" />
<m:Label id="_IDGenLabel2831" text="Days " />
<m:Input id="_IDGenText112241" value="{Day_S}" enabled="false" />
<m:Label id="_IDGenLabel2241" text="Joining Date" />
<m:Input id="_IDGenText112251" value="{JoiningData}" enabled="false" />
</form:content>
</form:SimpleForm>
</mvc:View>I'm trying to figure out what's causing the issue and how to fix it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.