cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a controller for extersion fragement in object page(OData V4)

daihao
Employee
Employee
0 Kudos

Dear Colleagues,

I try to add a fragement into my Object Page which is generated by Fiori Element, and it works. But how can I add the correspoding controller of this Object Page in manifest.json, I didn't find any material related to it. Anyone can hlep? Thanks in adavnce.

How to add a custom section as below

https://sapui5.hana.ondemand.com/#/topic/a357047be956436ebb1dfebf1aa29af2

Regards,

Hao

Accepted Solutions (1)

Accepted Solutions (1)

saurabh_singh1802
Discoverer

Hi Hao,

Currently you can add a custom section and include modules using "core:require" (as shown in the documentation example) if you have some runtime code.

<l:VerticalLayout core:require="{handler: 'SalesOrder/custom/CustomSection'}">
		<Button text="Custom Button" press="handler.buttonPressed" />
	</l:VerticalLayout>

I Hope this helps.

daihao
Employee
Employee
0 Kudos

Thanks Saurabh! I will try this way. So we won't use the controller.js to run our custom logic any more, "core:require" with js function is our first choice, is my understanding right?

saurabh_singh1802
Discoverer
0 Kudos

Yes, for now this is the only way to add controller logic. 🙂

Answers (0)