I am inserting data into table from user input via json model but every time a new input is given the previous row data is overwritten not concatenated tab.png. Can anybody help me? Thanks!
hi,Das
In Your Json model which binding u are using?(oneway binding or twoway binding).
if u are using two way binding,make it as oneway binding instead ofusing two way.
You already have an active moderator alert for this content.
Thanks for the response...
this is my code in controller:
onPress: function()
{ var oTable = this.getView().byId("tstable");
var jModel= new sap.ui.model.json.JSONModel();
//var model = this.getView().getModel("jModel");
var typ= this.getView().byId("ityp").getValue();
var hrs= this.getView().byId("ihrs").getValue();
var aData = [{ date: "", from: "", to: "", hours:"", type:"", customer: "", project: "lux", description: "" }];
aData.push({type: typ, hours: hrs});
jModel.setData(aData);
oTable.setModel(jModel);
Add comment