I have an XPage viewpanel which shows documents from a view. A column is configured to show values as links.
However, the links by default open the document in another XPage.
How can I change the default link generated for each entry in the view panel to open the document using a traditional form?
First you need to make each row availabe as a variable by defining the var
property in the "All Properties" tab for the view:
In this example, I named the var rowData
. We will use this name to programmatically refer to each row later when computing the url to each row.
Then we compute the link in the pageUrl
property in the "All Properties" tab of the View Column:
In our case, we'll compute a traditional Domino URL in the format http://server/database.nsf/0/0DB372DB6A56D186852574F8006DC4C0?OpenDocument
var _row:NotesXspViewEntry = rowData;
var _unid = _row.getUniversalID();
return "0/" + _unid + "?OpenDocument"
The code could also be written in a more compact format like:
return "0/" + rowData.getUniversalID() + "?OpenDocument"