cancel
Showing results for 
Search instead for 
Did you mean: 

Uncaught Error: Missing template or factory function for aggregation content of Element sap.ui.layout.VerticalLayout#idview22--vLayout !

Former Member
0 Kudos

Hi Anyone,


Please help me. By using the aggregation binding  concept, I need to bind the vertical Layout in xml view. In vertical Layout under "Content" trying to call the Factory Function while I am facing the above mentioned error. For your reference kindly find the below screen snap.

View.xml



Controller.js



data.json File

@Thanks In Advance.

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Sravya,

A similar kind of sample: Plunker

In the above sample, I have used table as my container where I create different controls based on model data.

Few things to check in your code:

1. Check the file path for factory function.

2. Did you declare the factory function path in controller definition to which the view is associated, something like this:


Regards,

Sai.

Former Member
0 Kudos

Hi Sai,

Factory function was defined in the respective controller itself. I am not using the separate file, So as per my understanding no need to mention the Path in sap.ui.define. My problem is while using xml views, where i need to call the function.

saivellanki
Active Contributor
0 Kudos

Sravya,

I don't think you can call the factory function from controller like that, as you can see it is not able to recognize the same. (I am not sure, may be some one else can help you on that).

But, here is an alternative if you wish to place the factory definition in controller: Plunker

Regards,

Sai Vellanki.

Former Member
0 Kudos

Hi Sai,

Finally I got the output.Need to follow the below steps.

1.Define the Factory Function in Controller.

2. Call the Factory Function in onInit method.

3. "companyList" Factory function Name.

Syntax to call Factory Function:

Regards

Sravya,

saivellanki
Active Contributor
0 Kudos

Nice!

But, you wanted to bind the aggregation on XML view? However, your approach is also good.

Regards,

Sai.

Answers (1)

Answers (1)

former_member203031
Contributor
0 Kudos

Hi Sravya,

I am not sure whether my guess is correct or not.

The way you defined content might be wrong.

The error you got is the syntax error.

Please go through the below link.

SAPUI5 Explored

Hope you will find a solution.

Thanks,

Deepak Raj.