You need to create a separate XPage for the form (document1) data source.
Then in the view control you "link" the clicking of the document in the view column to open the Form XPage.
You need to do yourself a favor and get some formal training before trying to blindly hack your way through XPages development. Regardless of the marketing hype it is NOT easy or intuitive.
TLCC has a free course here
http://www.tlcc.com/admin/tlccsite.nsf/coursedetails.xsp?ccode=XP85INTR
They also have additional training you can purchase.
Davidy leedy has free videos at Notes in Nine
http://notesin9.com/
matt white has pay for videos at
http://xpages101.net/
There are two IBM Press books on XPages and the Extension Library.