NotesXspViewEntry getUniversalID() not working

Hi everyone, I set up my Xpages like this:

ViewPanel with few columns, connected to a domino view datasource in a external notes database.

The XspView displays a list of articles.

I put a new column where i want to set a link to redirect to an agent. All this is working.

The issue is the parameter: i need to pass to the agent the UniversalID of the document (articles) of the row i clicked on.

I tried to use rowData (the name in the Var field) .getUniversalID() but this value chanfe everytime i refresh the web page.

How can i get the proper UniversalID of the document listed in the view and that i click on??

I really can’t find any hint in the help neither on the forum.

Any help?

Thanks

Marco

Subject: wiki article

Hi Marco,

It sounds as though you are applying the correct technique, but perhaps this wiki article would help: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/xpages-compute-urls-in-viewpanel.htm

If it does not help, can you post the source code using the rowdata variable?

-John

Subject: not working yet

Hi John and thanks for your help, sorry for my delay in the answer: i’ve been trying and trying different ways to make it work…with no success.

I used that article to do my test but i still can’t get the correct UniversalID.

I tried this two ways:

  • set a DataSource direclty on the Xpage and set the var value = “UF”, inherit that DataSource on the View and set the new var field to “vUF”;

  • set the Datasource on the View, set the var field to “cVF”.

My questions:

for the first case:

  • why UF and vUF are two different objects ? (I can’t use getNoteID on UF but i can on vUF)

  • should i use UF (the Xpage Datasource “var” name) or vUF (the “var” name of the View inherited from Xpage)?

for the second case:

  • why, in the View All properties, there are two fields “var”, what’s the difference ?

  • which one should i use ?

In all of these cases, i set a new column using the “var” name (UF, vUF, cUF) .getUniversalID() + “?OpenDocument” and i always get the “Invalid Universal ID” error in server console.

The code is basically exactly the same as the one in the article you passed me, but if what above is not enough, i can post it as well.

Thanks very much.

I’ll appreciated any help, can’t understand why such a simple thing doesn’t work!!!

Marco

Subject: hard to debug in the forum

Marco,

If you feel up to having another set of eyes taking a look at it, please send me a copy. My email is john.mackey at groupwareinc.com.

-John

Subject: mail

John, I sent you an email…thanks

Marco

Subject: may NSFDB2 influence…?

I set up a new Domino server, same condition as the previous one and i made two xpages,one with a view datasource, (on the first column “show as link” and set the other xpages as default form) and the other one with a document datasource.

It worked perfectly !

So i tried to understand and…

(ok maybe i had to say it earlier…)

on my first server the database is DB2enabled, and the NotesView used as datasource in the first Xpages is a QueryView, which means it’s getting data from DB2…

Could this influence and be responsible for this behaviour?

Thanks Marco