on 03-19-2017 7:53 PM
Hi,
I have an XML model bound to a table and I want to add a new row to the model. The XML data itself is rather simple:
<gettagevents>
<tageventlist>
<tagevent>
<time>2011-09-09T14:29:16.302Z</time>
<factory>06</factory>
<materialcode>21</materialcode>
<serial>16999991231</serial>
</tagevent>
<tagevent>
<time>2011-09-09T14:29:17.101Z</time>
<factory>06</factory>
<materialcode>21</materialcode>
<serial>16999991232</serial>
</tagevent>
</tageventlist>
</gettagevents>
Only relevant is the value <serial>, so it would be enough for me to add a new <serial> number to the model. I have read about document.createElement, which I guess could work for me, but I do not get it working.
I have this part in my controller:
var oTable = this.getView().byId("tbl_det3_rfid");
var oSerial = "1234567890";
var oModel = oTable.getModel();
var aData = oModel.getProperty("/tageventlist/tagevent/serial")
Can anyone help me how to get this done, so adding a new line to my model with the serial 1234567890?
Thanks,
Tim
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.