Target ViewPanel to a form on the same page

This should be simple, but as an XPages newbie I’ve been (re)searching for a few hours with no result. The question is:

I have a ViewPanel and a Panel that contains document fields (like an embedded form) on the same XPage. I want to link the view to the panel, so that the document data gets displayed next to the view (with a partial refresh) on the same page. But I cannot find a way to link the view to the panel form. Would someone point me in the right direction, please?

Thanks

Sam Star

Subject: the solution

I could solve it with the following:

In the view’s column that generates a link I’ve put this code:

viewScope.UNID = rowentry.getDocument().getUniversalID();

return(false);

and set it to make a partial refresh of the Panel

Then, in the document data source definition, the document id is simply:

viewScope.UNID