Smartclient - v8.3p_2013-02-19/LGPL Deployment
I'm trying to fetch more than one time on a same DataSource, each one from a different button because I need 2 different callbacks depending on what button is pressed for this fetch. both fetch apply a filter, and the result is what I need to be able to export it. So I would like to know how can I force that the Fetch is done, as the second time it interpretates that is allready done and doesn't do it.
My code
I'm trying to fetch more than one time on a same DataSource, each one from a different button because I need 2 different callbacks depending on what button is pressed for this fetch. both fetch apply a filter, and the result is what I need to be able to export it. So I would like to know how can I force that the Fetch is done, as the second time it interpretates that is allready done and doesn't do it.
My code
Code:
isc.SDPListGrid.create({ ID: "empList_$$", width:"100%", autoDraw:false, hidden:true, hiddenParent: this, dataSource: ELDSID }); isc.SDPToolButton.create({ ID:"buttonexport_$$", icon: "fileimages/export_text-icon.png", title: "system.exportList@$", action:function (){ empList_$$.fetchData(null, function(response){ response.data =empListDS_$$.applyFilter(response.data,advancedFilter_$$.getCriteria()); serverCallList(response.data); }); } }); isc.SDPToolButton.create({ ID:"navExport_$$", icon: "fileimages/export_text-icon.png", title: "system.exportDetail@$", action:function (){ empList_$$.fetchData(null, function(response){ response.data =empListDS_$$.applyFilter(response.data,advancedFilter_$$.getCriteria()); serverCall(response.data); }); } }); function serverCall(responseData){ isc.RPCManager.sendRequest({ params:{ data:responseData }, callback: function c(response) { return true; }, actionURL: "WebDesktop.jsf?method=Employee.exportdetail" }) } function serverCallList(responseData){ isc.RPCManager.sendRequest({ params:{ data:responseData }, callback: function c(response) { return true; }, actionURL: "WebDesktop.jsf?method=Empcontract.export" }) } isc.SDPFilterDynamicForm.create({ ID:"filterUpdater_$$", dataSource: EMPLISTSELDS, recordSelector:filterSelector_$$, advancedFilter:advancedFilter_$$ }),
Comment