Action Button (e.g. Approve) Example for checkbox column in ViewPanel

Mindwatering Incorporated

Author: Tripp W Black

Created: 12/15/2011 at 03:27 AM

 

Category:
Notes Developer Tips
XPages

Task:
We want to write a button, say "Approve", that can approve a bunch of selected documents in a view (View Panel).

Notes:
Update the viewPanel1 ID to the id name of your view panel if you set one.
Update the _colcbox ID to the id name of the column within the view panel with the checkboxes.

Client Side:
Write something similar to below:
if(!XSP.isViewPanelRowSelected("#{id.viewPanel1)", "_colcbox")){
!XSP.alert('Please select document(s) to approve.');
return false;
}
if(!XSP.confirm('Approve the selected document(s)? Are you sure?')) {
return false;
}

Server Side:
Choose simple action to delete documents.

previous page