< Back

Document Subject: Add an Edit button with hide when @IsDocBeingEdited on an Xpage
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#xpages-edit or http://A555F9/nn.nsf/ByAlias/xpages-edit

How to add an Edit button to an Xpage.




Add a button from the Core Controls pallete.

The code for the button should be:

context.setDocumentMode("edit");

NB You can also have context.setDocumentMode("readOnly");     and also autoEdit and toggle

The Visible computed formula should be:

!document1.isEditable()

The @formula @IsDocBeingEdited does not work in XPages as there may be several data sources.