contentManager setFunction third_on_add function con_id this ds basePa

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
contentManager.setFunction("third_on_add",
function(){
con_id = this.ds.baseParams.sub_rel_id;
dsT = new dataStore(
new Proxy("/phone_book/get_from_phone/"
,"GET"),
new JSONReader(
{root: "rows",
totalProperty: "totalCount",
id:"id"},[
{name: 'id'}
]
));
ds.baseParams = {"contact_id":con_id};
ds.afterLoad = function() {
cbCategory.setValue(dsT.records[0].cat_id);
cbContact.setValue(con_id);
}
ds.load()
return addCentrexPhone();
}
);