javascript - Get database if combobox is selected in data table -
i've created functionality can databases listed view. after loop through documents , can display them accordingly in data table using computedfields.
here's code have:
try { var viewdocs:java.util.vector = new java.util.vector(); var relcol = database.search("form='dbpick_kappa'"); var bazu_skaits= relcol.getcount(); var doc:notesdocument = relcol.getfirstdocument(); var alldocs:java.util.vector = new java.util.vector(); (j=1;j<bazu_skaits+1;j++) { viewdocs.add(doc); var serveris = doc.getitemvaluestring("server_p"); var datubaze = doc.getitemvaluestring("filename_p"); var db:notesdatabase = session.getdatabase(serveris, datubaze,false); var sender = getcomponent("senderbox").getvalue(); var allrelevant:notesdocumentcollection = db.search("statusflag='" + sender + "'"); var skaits = allrelevant.getcount(); var tmpdoc = allrelevant.getfirstdocument(); (i=1;i<skaits+1;i++) { alldocs.add(tmpdoc); tmpdoc = allrelevant.getnextdocument(tmpdoc); } doc = relcol.getnextdocument(doc); } return alldocs; } catch(e) { kk = e.tostring(); }
the code works ok if want select databases have in view. i'm wondering there way select databases need including checkbox in data table? doig check checkbox , if it's checked return database has checkbox selected near it. understand i'm trying achieve.
data iterators view panel, data view etc have getselectedids() method allow noteids of selected elements current page of view. i'm not sure if that's in datatable, if you're displaying view entries datatable offers little benefit on view panel. view panel allows add components column, have copy , paste xml component relevant location on source pane - drop action moves components outside view panel.
also, should habit of recycling in loops (unless you're using openntf domino api, you). not doing crash server if enough domino objects accessed during request (page load / partial refresh). see blog post http://www.intec.co.uk/the-perils-of-getcolumnvalues-get0/
Comments
Post a Comment