Welcome to the IBM Collaboration Solutions Community IQJam
UsernamePassword
Reset Password | Register
   
Home | Tags | Help
What's the best way of getting a handle on a document in an embedded view? 
I'm sure other developers have seen this sort of situation before. You have a document with an embedded view, and you want to be able to select one (or more?) documents on that embedded view and do something on them.

What's the neatest/cleanest/"bestest" way of doing this? (Actions on the embedded view don't count!)

Also, although not essential, would love to find a solution that works on several Notes versions (6.5/7/8).

Thanks!
Pedro

Domino Development / LotusScript
Pedro Quaresma - over 4 years ago |  |  | Viewed 455 times

There are 5 answers

7votes
Sadly, actions on the embedded view is pretty much the answer. I also posted some Notes API code long ago (Windows-only) that might work in some circumstances:

http://www.nsftools.com/tips/NotesTips.htm#selecteddocsclass

The whole embedded view thing is a bit quirky though, so YMMV. I'd use view actions if I was you.
Julian Robichaux - over 4 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community
1votes
I have done a lot of research on this question in the past to build a SelectedDocuments property for a DominoView class within my .DominoFrmaework.  It seems if you cannot get a handle via NotesUIWorkspace.Currentview then the only way I have found is to use Julian's code.
Peter Presnell - over 4 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community
4votes
Most of the times I use a view action like Julian mentioned but here's something that might work. Use an embedded editor to load the document that you select in the embedded view, on the embedded form's post open event write the unid or whatever you need to identify the document to notes.ini and then get the value from the 'main' document.
Vitor Pereira - over 4 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community
0votes
There are situations in which embedded view's actions won't do the trick as values from the parent document might be needed, so I like Vitor's solution the best (as per Chris Blatnick's "Google Mail Clone" if I'm not mistaken?) but never tried it with multiple documents.

There's another solution but it doesn't really work with more than one document so I'm normally not keen on using it: Basically you can set on the embedded view's "target frame (single click)" a @setprofilefield/@environment with the unid of the clicked document. Then retrieve it through @getprofilefield/@environment from the main doc.

Thanks all for the ideas!


Pedro Quaresma - over 4 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community
0votes
For selecting individual documents in an embedded view, Richard Moy has a good solution to this at "http://dominointerface.blogspot.com/search?q=composite".
 
For multiple documents in an embedded view, see "http://www.lotus911.com/nathan/escape.nsf/d6plinks/NTFN-6Z3R8C".

Hope that helps
 
Wayne Sobers - over 3 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community

Experts for Domino Development / LotusScript