I was thinking something like this:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.resources>
<xp:script src="/JSLibrary.jss" clientSide="false"></xp:script>
</xp:this.resources>
<xp:this.data>
<xp:dominoView var="view1" viewName="view1"></xp:dominoView>
</xp:this.data>
<xp:table>
<xp:repeat id="repeat1" rows="30" value="#{view1}" var="row">
<xp:tr>
<xp:td>
<xp:checkBox text="" id="checkBox1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:Library.toggleSelected(row.getDocument().getUniversalID());}]]></xp:this.action>
</xp:eventHandler></xp:checkBox>
</xp:td>
<xp:td>
<xp:text escape="true" id="computedField1"
value="#{row.field1}">
</xp:text>
</xp:td>
<xp:td>
<xp:text escape="true" id="computedField2"
value="#{row.field2}">
</xp:text>
</xp:td>
</xp:tr>
</xp:repeat>
</xp:table>
<xp:br></xp:br>
<xp:br></xp:br>
<xp:button value="Delete Selected" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:Library.deleteAllSelected();}]]></xp:this.action>
</xp:eventHandler></xp:button>
</xp:view>
function Library() {
}
Library.vec = new java.util.Vector();
Library.toggleSelected = function(id:string) {
if (this.vec.contains(id)) {
this.vec.remove(id);
}
else {
this.vec.add(id);
}
}
Library.deleteAllSelected = function() {
var db:NotesDatabase = session.getCurrentDatabase();
var doc:NotesDocument;
for (i=0; i<this.vec.size(); i++) {
doc = db.getDocumentByUNID(this.vec.elementAt(i));
doc.remove(true);
this.vec.remove(this.vec.elementAt(i));
}
}