on 01-04-2018 11:58 AM
Hello Community,
I've a problem, that I couldn't solve about binding data dynamically to the table.
https://stackoverflow.com/questions/48093072/ui5-data-binding-from-an-array-of-objects-js-view
I would be very happy , if any of you could tell me how to solve this problem.
Cheers.
Hi,
I do agree that you should post your question here and not link to it. In addition, providing with some sandbox example on JSfiddle/JS Bin or any one of those platforms would allow for a tested solution. As you haven't done that I will give an outline and try some code that might not work.
I don't understand your problem. If you found a solution that works:
"{" + elementId + "/stoff/0/STOFFTYP}";
why not loop over the array and build that ColumnListItems?
You can replace it in with the index number, something along these lines (adjust it correctly)
var path_STOFFTYP = "";
for (var i = 0; i < stoff.length; i++) {
var path_STOFFTYP = "{" + elementId + "/stoff/" + i + "/STOFFTYP}";
...
}
If getting stoff array is the issue, it should be something like this
var stoff = oModel.getData().stoff;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Okyanus,
Could you please describe the issue here instead of linking it to another site.
Have you tried this:
oTable.bindItems({
path : oData.bindingContext.getPath() + "/results/rs999",
template: view.oInnerTemplate2
});
Instead of text, use "path" on your cell:
new sap.m.Text({
path: "model>/" + elementId + "/stoff/STOFFTYP"
})
Regards,
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.