Skip to Content
0

custom control relative path error

May 17 at 06:05 AM

29

avatar image

Hi Experts,

I am trying to include a custom control in my ui5 app in WEBIDE.

I am getting makeNestedError due to incorrect relative path.

UI5 App - sapCustomControlTest

Control Folder - declare

Please find my folder structure image :

i am using following code in component.js init() :

var currentPath = jQuery.sap.getModulePath("com.sapCustomControlTest");
jQuery.sap.registerModulePath("declare.ui",currentPath+"./../../declare/ui");

Then i am trying to use in my main.view.xml located under view folder as follows :

<mvc:View controllerName="com.sapCustomControlTest.controller.main" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"
	displayBlock="true" xmlns="sap.m"
	xmlns:containers="declare.ui.containers"
	>
	<App>
		<pages>
			<Page title="{i18n>title}">
				<content>
					<containers:ShadowBox/>
				</content>
			</Page>
		</pages>
	</App>
</mvc:View>

I am getting following error in console:

kindly suggest.

Best regards,

Ankit Agarwal

d1.png (8.0 kB)
d2.png (16.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers