How does the "At runtime, open selected document using" option
work in XPages views?
This option may be ambiguous on first reading, but it's probably best explained
using the following use case:
You have a view panel which uses a Notes View as a data source and this
Notes View should open the documents using different XPages, depending
on the document type.
First, you have to display a view column as a link, using the following
Then the view control has to choose, at runtime, which XPage to open for
the document the user clicked on.
For this, it uses the following strategy:
- If you specified an XPage name in the
view panel properties, it uses that.
- If you specified 'The document's default
form or page', it gets the form associated with the document (from the
'form' field) and checks if an XPage has been assigned to this form:
This allows the use of different forms based on the document type.
For example, when a view contains parent and response documents that should
be displayed differently.
- If no form is assigned to the document,
then it tries the database default form.
- It tries an XPage named like the form
name of the document.
(The emitted URL will contain "$$OpenDominoDocument.xsp" and
compute the actual form name based on the original form name used plus
throws an error if it doesn't exist.