View Full Version : ws.picklist
dominodev2003
5 Oct 2009, 9:22 AM
Stuck and hope somone can help with this. Lets say you've populated a field using ws.picklist but the user goes back to select additional names, how do you populate the "names" tree with the already selected values from the field? Here's the code im using:
ws.pickList({
type: "names",
showSearch: false,
dbPath : "/names.nsf/",
viewName : "($VIMPeopleByLastName)", //
title : "NAB",
column :1,
multipleSelection : true,
useCheckboxSelection : false,
callback : .........
})
Thanx
Zee
Bob Wilson
14 Jan 2011, 1:59 PM
Hey, it was an interesting question, and I have the same problem today... Any simple answer ? Or do we have to go deeper into the script ?
dominodev2003
19 Jan 2011, 6:06 PM
This has been a while back but heres what I did:
function showNAB(fieldname){
ws = new Ext.nd.UIWorkspace();
ws.pickList({
type: "names",
showSearch: false, //disables search field on footer
dbPath : "/names.nsf/",
viewName : "($VIMPeopleByLastName)", //
title : '...',
column :1,
data: [{name: "va1"},{name: "val2"}],
multipleSelection : true, // true allows selecting multiple names
useCheckboxSelection : false, //displays checkbox next to name
callback : function(recs) {
var tmp = "";
if (recs != null) {
for (var i=0; i<recs.length; i++) {
tmp += recs[i] + ";";
}
Ext.get(fieldname).dom.value = tmp.substr(0,tmp.length-1)
}
}
},Ext.get(fieldname).dom.value);
}
Hope this helps.
Bob Wilson
20 Jan 2011, 6:41 AM
This is great, thank you !
dominodev2003
20 Jan 2011, 7:02 AM
np. but i would caution usage. If you can consider coding using standard ext and use the managediframe extention (domino will require this due to its structure). Only saying this because not sure when a "gold" will be released.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.