|
发表于 2013-2-20 11:24:26
|
显示全部楼层
那是要发action操作的
那个例子中都用,sortOrgs.js中只是实现了UI下的移动
/UI/SA/OPM/organization/mainActivity.w中有弹出框的返回事件- mainActivity.wdSortOrgsReceive =
- function(event) {
- var dOrgTree = justep.xbl("dOrgTree");
- var parentID = mainActivity.isTreeRoot() ? null : dOrgTree.getCurrentRowId();
- var ids = new justep.Request.ListParam();
- var versions = new justep.Request.ListParam();
- for ( var i = 0; i < event.data.getRowsNum(); i++) {
- var id = event.data.getRowId(i);
- var version = event.data.getValueByName("version", i);
- ids.add(new justep.Request.SimpleParam(id, justep.XML.Namespaces.XMLSCHEMA_STRING));
- versions.add(new justep.Request.SimpleParam(version, justep.XML.Namespaces.XMLSCHEMA_INTEGER));
- }
- var params = new justep.Request.ActionParam();
- params.setList("ids", ids);
- params.setList("versions", versions);
- if (parentID)
- params.setString("parentID", parentID);
- justep.Request.sendBizRequest(justep.Context.getCurrentProcess(), justep.Context.getCurrentActivity(),
- "sortOrgsAction", params, null, function(callbackData) {
- if (callbackData.state) {
- alert("排序成功。");
- mainActivity.resetTreeNode();
- mainActivity.refreshListData();
- } else {
- justep.OpmUtils.showError(justep.Request.getServerError(callbackData));
- }
- });
- };
复制代码 |
|