In the sample application, you want to be able to access documents by clicking on their row in the view.
You want the user to initially open the mainview
XPage and see the existing documents. You then want the user to able to click on a document in the view and open the main
XPage populated with the data from the document clicked on in the view.
Parent topic: Your first XPages application
- Open the mainview XPage.
- Click inside the data (lower) part of the subject column.
- Set up the subject column entries as links that point at the underlying documents. Also, at this time, set up the view to indent response documents - which you will explore later.
- Click on the subject column - the bottom part, not the column header.
- Under properties, click the Display tab.
- Select Show values in this column as links.
- Select Indent responses (scroll right if necessary).
- You still have to specify which XPage to open when the link is clicked:
- Click inside the View control but outside the pager and all columns so focus is on the view itself.
You want the cursor to be barely inside the View control.
- Under properties, click View.
- Ensure that the runtime target is the XPage associated with the document's form.
This means that clicking on a document whose form is main
opens the main
XPage, and (later) clicking on a document whose form is response
opens the response
- Save the mainview XPage.
- Preview the page or open it in a client.
Notice that the subjects appear as links. Clicking on a link opens the appropriate XPage populated with the data from the underlying document.
Clicking the Submit
button on the main
XPage takes you back to the mainview