How to delete selected documents from XPage view panel?
In a tradition lotus notes, we use to do lot of logic to delete
the documents from Lotus notes view on webpage. But the XPage has made this
very simple. No script no- complex logic. You have configure the delete
document logic only.
Here are the steps to delete document from view panel.
1. Add view panel to you XPage
2. Now go to the ‘view panel property’
3. Go to the ‘display’
property
4. There you can find the ‘checkbox
filed. Just select the check box filed.
Now look the view panel, you can see the first
column is marked with checkbox.
Preview your XPage in web and see, all the
rows from first Column are marked with checkbox and with column values.
5. Now, go to the domino
designer again and go to XPage core controls
6. Select the button control from
core controls.
7. Add button control on XPage
near to view panel or view panel top.
8. Go to button control properties
and find label property ‘change name to ‘Delete Document’
Till now you have configured the basic
steps for delete document command but now the important steps to delete actual
document from notes database using XPage power.
Also, you have option add customized confirmation
box before deleting the document from notes that prevent the unwanted deletes
from database. Now do the easy steps.
9. Click on ‘Delete document’
button which we have added recently
10. Go to the button ‘Event’, there
you can see ‘client’ & ‘server’ event , select ‘Server’
11. Click on ‘simple action’ radio
button, if it’s not selected.
12. Select the ‘Add Action’
button below to simple action selector
13. Click on add action button
on server side ‘On Click’ event.
14. Also, you need to select Ajax
‘server option’ to ‘Partial Update’ and click on
15. Select element add element
as your view panel name, this will prevent the page refresh and here you can
see the power of XPage. Refer below screen.
Now, once you clicked the add action button,
you will get popup to add simple action. Search all the action available in the
simple actions and select category as ‘document’
16. After selecting ‘document’
category for simple action now select action.
17. Select action as delete selected
document. To get best idea refer below screen.
18. After selecting ‘action as
Delete selected document’ ‘Arguments for this action’ section.
19. Select the view name i.e.
view panel from which you want to delete document, its mandatory option for
deletion command.
20. Now see the confirmation
text added in confutation text field, this in optional field but better to keep
unwanted deleted from database, it’s up to you, your chose.
21. This confirmation box will
display when you click on ‘delete document button.
22. Now, click ‘Ok’ and Save
your XPage.
23. Preview your XPage on web
browser.
Here you can see the view panel with delete
document button and each row with added checkbox.
Now select the checkbox and click on delete
document button. The message box should be display “do you really want to
delete this document?’ say yes and see the XPage power, document will be
deleted without refreshing the whole page.
Thanks for reading this article, hope you
like it, if you have any difficulty please contact us on ‘admin@xpagedomino.com’
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a comment