Xpages: Edit on the same screen

I’ve been playing with xpages and I have what I think is a simple question.

I have a view page, a form page and an index page of which the two pages are embedded on. (roughly following the personal address book example in the online tutorial)

When I click on one of the links in the view, the document opens up in it’s own window for editing. What I want to have happen is for the user to stay on the index page, and the fields of the form will be populated with the data. Is this possible?

Subject: yes it is

Put both data sources on the same xpage - view and document.Link a column to open the document to the same xpage.

have a look here for an example

http://openntf.org/demos/xpages.nsf/ctrlsContainerViewPanel.xsp?action=newDocument

p.