首页 > 代码库 > xpage 获取 附件

xpage 获取 附件

var db:NotesDatabase=session.getCurrentDatabase();
var doc:NotesDocument=db.getDocumentByUNID(‘80E2193C517E9B3A872578D90018D92E‘);
var valString:String = "";

if (doc.hasItem(‘BWImage‘)){
var nrt:NotesRichTextItem=doc.getFirstItem(‘BWImage‘);
if (nrt!=null){
    var eos:java.util.Vector = nrt.getEmbeddedObjects();
      if (eos.isEmpty()) {
        valString = ‘Nothing found‘;
      } else {
          var v;
        for (v = 0;v < eos.size();v++){
        var eo:NotesEmbeddedObject = eos.get(v);
        valString = valString + eo.getName() + ‘ - ‘ ;
    }
}
}
return valString;
}

參考:http://planetlotus.org/profiles/brian-moore_93680