Skip to Content
0

Process Flow sapui5 javascript

Oct 20, 2016 at 01:18 PM

157

avatar image

Dear experts,

I'm trying to implement an app that use a process flow. I have problem in setting this object and also in a very basic app I always have the same error:

Uncaught Error: found in negative cache: 'sap/suite/ui/commons/ProcessFlow.js' from undefined/sap/suite/ui/commons/ProcessFlow.js: TypeError: Cannot read property 'declare' of undefined.

Could someone please give me any hint? I'm developing with eclipse and testing with chrome.

Thanks a lot.

Luca

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8' />


<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
	id="sap-ui-bootstrap" data-sap-ui-xx-bindingSyntax="complex"
	data-sap-ui-theme="sap_bluecrystal"
	data-sap-ui-libs="sap.m, sap.ui.layout, sap.ui.core, sap.suite.ui.commons">
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js">
</script>




<script>
	var pageFrame = new sap.m.Page();	
	var oProcessFlow = new sap.suite.ui.commons.ProcessFlow();
	pageFrame.addContent(oProcessFlow);
	var oApp = new sap.m.App("App", {
		initialPage : "pageFrame"
	});
	oApp.addPage(pageFrame);
	oApp.placeAt("uiArea");
</script>




	</head>
 <body class="sapUiBody" role="application"> 
	<div id="uiArea"></div>
</body>
</html>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Sergio Guerrero Oct 20, 2016 at 01:30 PM
2

Luca,

you do not need to add the JQuery lib into your app - sapui5 already has it. the "pageFrame" id you had added is needed on the nav container which is not there... here is a semi-solution - i removed the reference to jquery.. and also the pageFrame id...

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8' />
<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
id="sap-ui-bootstrap" data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m, sap.ui.layout, sap.ui.core, sap.suite.ui.commons">
</script>
<script>
var pageFrame = new sap.m.Page();
var oProcessFlow = new sap.suite.ui.commons.ProcessFlow();
pageFrame.addContent(oProcessFlow);
var oApp = new sap.m.App("App", {});
oApp.addPage(pageFrame);
oApp.placeAt("uiArea");
</script>
</head>
 <body role="application"> 
<div id="uiArea"></div>
</body>
</html>

you will need to follow the object structure as shown here:

1) process Flow

1.1) nodes

1.1.1) processNodeFlow ... etc

https://sapui5.netweaver.ondemand.com/sdk/explored.html#/sample/sap.suite.ui.commons.sample.ProcessFlow/code

hope you can follow

PS: - i would suggest you use XML views as well, it will be easier to read at the end when you have a lot more code.

good luck1

Share
10 |10000 characters needed characters left characters exceeded
Luca Lovato Oct 21, 2016 at 08:03 AM
0

Thank you very much Sergio, now it works!

Share
10 |10000 characters needed characters left characters exceeded