Hi,
How to send additional (in addition to updated fields and primary key) parameters with sendAllEdit () for List Grid?
Please let me know how to solve the above issue.
Hi,
How to send additional (in addition to updated fields and primary key) parameters with sendAllEdit () for List Grid?
Please let me know how to solve the above issue.
You should be able to override transformRequest in your DataSource. Let me know if you need an example.
Hi,
Can you please show an example in this regard.It will be very helpful.
Thanks..
Hi,
Here is an example where I send a technical id in addition of updated fields only for update operation binding:
See transformRequest:
isc.DataSource.create({
ID: "activitiesDS",
dataFormat: "xml",
operationBindings : [
{ operationType:"fetch", dataURL: "http://0.0.0.0:8887/findMission?mid="+localMissionID, dataProtocol:"getParams", recordXPath : "//activity" },
{ operationType:"update", dataURL: updateActivityURL, dataProtocol:"postXML", requestProperties: {showPrompt: true} }
],
fields:[
{name:"name", title:"Name", primaryKey: true},
{type:"select", name:"status", title:"Status", valueMap:["ABORTED", "COMPLETED", "ONGOING", "PENDING"]},
{name:"role", title:"Role", valueXPath:"mis:role"},
{name:"dataName", title:"Data", valueXPath:"references/mis:reference/name"},
{name:"uri", title:"URI", valueXPath:"references/mis:reference/uri", type: "link"},
{name:"type", title:"Type", valueXPath:"references/mis:reference/type"}
],
xmlNamespaces: {
mis:"http://sdmps.tnnl.thales.com/schemas/mission/1.0",
ctx:"http://sdmps.tnnl.thales.com/schemas/alert/1.0"
},
// customized to add mission id to XML message, we also add old values because SmartClient
// sends by default only changed elements
transformRequest : function (dsRequest) {
if (dsRequest.operationType == "update") {
return isc.addProperties({}, dsRequest.oldValues, dsRequest.data, {mid : localMissionID});
}
}
});
Hope it will help you