Hi Experts,
In the controller.js, i have written a clone statement like this:
var oView = that.getView().byId("aggregatedView").clone(); // i need a cloning here to avoid loosing the existing binding
oView.bindItems({
path: "/ZEntity",
template: that.getView().byId("aggregatedViewItems"),
filters: aFilters });
I am receiving an error as described here:
During a clone operation, a template was found that neither was marked with 'templateShareable:true' nor 'templateShareable:false'. https://sapui5.hana.ondemand.com/sdk/#docs/guide/3a4a9e562988456c9be0ef883ae7da50.html
I know i have to set templateShareable to either false or true somewhere(i dont know where exactly).
I tried setting in the XML view like this: it did not work
<items>
<core:Item id="aggregatedViewItems" key="{Key1}" text="{Text1}" templateShareable="false"/>
</items>
Can somebody help me with syntax how i can set templateShareable within/before this statement: var oView = that.getView().byId("aggregatedView").clone();
BR,
Venky.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
why you want to clone?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jun,
I wanted to clone due to the usage of template for binding and both problem and solution is explained here: https://archive.sap.com/discussions/thread/3542984
Any idea how i can set templatesharable before clone ?
BR,
Venky.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.