views:

247

answers:

0

I have encountered strange problem with collection variable in repeat control (iterating NotesDocumentCollection). Collection variable named to "doc" to access row data (type of NotesDocument).

If I put computed field control into repeat, binding doc.field works. If I use Javascript, I can access variable "doc" in it and compute content of that field.

BUT: if I use link control and want to compute link name or URL, JavaScript (the same working in computed field control) raises error - variable doc undefined (and repeat fails to render). WHY?

Workaround: To put two extra computed fields with binding (doc.LinkName) and JavaScript (to compute url), and to use getComponent("computedText").getValue() instead. Other option is to surround computed fields with html < a > tag in source (how dirty).

JavaScript:
var url:XSPUrl = new XSPUrl(context.getUrl().toString());
url.setParameter('key',doc.Key);
url

Can anybody explain, why collection variable works for xp:text, but not for xp:link controls?