获取所选文档的 UNID 并保存到范围变量 [英] get the unid of selected documents and save to scoped variable

查看:27
本文介绍了获取所选文档的 UNID 并保存到范围变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有复选框的 viewPanel1.通过单击按钮,我想将所选项目的 univ id(逗号分隔)保存到范围变量中.我试过这个:

I've a viewPanel1 with checkboxes. By clicking on a button I would like to save the univ id's (comma seperated) of the selected items to a scoped variable. I tried this :

var viewPanel=getComponent("viewPanel1");var docIDArray=viewPanel.getSelectedIds();for(i=0;i

推荐答案

var viewPanel=getComponent("viewPanel1");
var docIDArray=viewPanel.getSelectedIds();
var unidArray = new Array();
for(i=0; i < docIDArray.length; i++) {
   var unid=database.getDocumentByID(docIDArray[i]).getUniversalID();
   unidArray.push(unid);
}
sessionScope.put("test", @Implode(unidArray, ","));

这可能会做到.

这篇关于获取所选文档的 UNID 并保存到范围变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆