
I'm experiencing an issue when binding a JSON model to a table that has input enabled and TwoWay binding. To illustrate better, check out the example on JSBIN Example and within the output screen, drag each slider and notice the different behaviour.. The top slider works as expected, but the others get stuck as you drag it. When looking at it in more detail, it's like the whole item in the table is getting refreshed each time anything in that row changes.
Anyone seen this and/or have any ideas how to stop this happening while keeping TwoWay binding on?
Thanks,
Matt
Request clarification before answering.
Hi Matt
Haven't seen this issue before - it might be a glitch in two-way binding to table rows since when you switch to one-way data binding, then the problem goes away...
onInit: function(oEvent) {
var oModel = new JSONModel({
DiffWeighting: 25,
Objectives: [
{ Description: "Value 1", Weighting: 25},
{ Description: "Value", Weighting: 50}
]
});
oModel.setDefaultBindingMode(sap.ui.model.BindingMode.OneWay);
this.getView().setModel(oModel, "Objectives");
}
Chris W
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Chris. OneWay binding does fix the behaviour somewhat, but then I have to put change events on all the fields plus other similar issues occur even with OneWay binding with more complex scenarios. e.g. The example is a simplified example I'm dealing but when you throw in OData based ComboBoxes lists, and more input fields; and it has other strange behaviour.
Work around (if I have to go down that path), is I'll manage the aggregation programmatically, but I was just hoping I'd done something stupid and someone would tell me what the stupid thing was!
BTW - This is happening from 1.44 to the latest UI5 release, but maybe I am the first one to do something like this! - It's a strange design pattern I'm going for based loosely on the following:
https://sapui5.hana.ondemand.com/#/sample/sap.m.sample.TableEditable/preview
Cheers,
Matt
| User | Count |
|---|---|
| 6 | |
| 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.