cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the following warning / error in UI5

Former Member
0 Kudos
780

A shared template must be marked with templateShareable:true in the binding info - .

My app was working well and still it is. However i seem to get the above warning / error message when i reload the application.

Is it a problem

View Entire Topic
Former Member
0 Kudos

sap.ui.version

"1.32.3"

I am not getting this issue now. I did a git pull and this issue was not coming. I assume some other module fixed it.

however i am curious about the message itself, what does that mean.

Sorry Vijay, i went through the link, i am new to UI5. It was hard to comprehend.

Former Member
0 Kudos

If you are using any sub-classes (sub-objects) of the object sap.ui.base.ManagedObject and the aggretation is bound to a collection of items, then the templateShareable value must be set to true. In simpler terms:

Lets say that you have below code in your XML view, then note that the templateShareable below is set to true. Otherwise you get an error in the console.

<template>

                                <ComboBox

  value="{ItemCategory}"

  items="{          

  path: '/ItemCategoryMasterData',          

  sorter: { path: 'text' },

  templateShareable : true }" >

                                    <core:ListItem key="{key}" text="{text}"/>

</template>

Thanks,

Charles

FouadSadik
Advisor
Advisor
0 Kudos

Thank you. This is the solution.