Thứ Tư, 16 tháng 11, 2016

Add value to datatype multil ibm case manager



var coord = payload.coordination;
var workitemEdit = payload.workItemEditable;
var solution = this.solution;
var prefix = solution.getPrefix();

require(["icm/base/Constants", "icm/model/properties/controller/ControllerManager"], 
function(Constants, ControllerManager){

if(coord){

/*Participate in the VALIDATE cordination step*/

coord.participate(Constants.CoordTopic.VALIDATE, function(context, complete, abort){

/*Check the specific response, an empty string ("") stands for the Complete button*/

if(context[Constants.CoordContext.WKITEMRESPONSE] === "Apporve")
{

   /*Check work item property attribute's value*/

  

   /*Retrieve prop value using property controller API*/

   /*Unbind is necessary to prevent mem leak.*/
var propsControllerSTT = ControllerManager.bind(workitemEdit);
console.log(" :", propsControllerSTT);
var controllerSTT = propsControllerSTT.getPropertyController("F_CaseFolder.DOL_STT");
console.log(" :", controllerSTT);
var arrValue = controllerSTT.get("value");
//var choicesSTT = [];
arrValue.push("1");
arrValue.push("2");
arrValue.push("3");
arrValue.push("10");
arrValue.push("15");
arrValue.push("20");
console.log(": choicesSTT ", arrValue);
controllerSTT.set("value", arrValue); 
console.log(": set value ok ");
var propsControllerMota = ControllerManager.bind(workitemEdit);
var controllerMota = propsControllerMota.getPropertyController("F_CaseFolder.DOL_Mota");
var arrValuemota = controllerMota.get("value");
//var choicesDes = [];
arrValuemota.push("xxx");
arrValuemota.push("xxx");
arrValuemota.push("xxxxx");
arrValuemota.push("xxxxx");
arrValuemota.push("xxxx");
arrValuemota.push("xxxxx");
console.log(": choicesDes ", arrValuemota);
controllerMota.set("value", arrValuemota);
console.log(": set value ok 2");
   
   
   ControllerManager.unbind(workitemEdit);

   
     complete();
   
 }else
 {
    complete();
 }
 });
}
});

Không có nhận xét nào:

Đăng nhận xét