Reputation: 2169
I have a computed column image ( icon ):
<xp:this.iconSrc><![CDATA[#{javascript:var formName = rowData.getDocument().getItemValueString("Form");
var iconNumber = parseInt(rowData.getColumnValue("$8"));
if ( formName == "fmCompanie") {
"/.ibmxspres/domino/icons/vwicn" + (iconNumber > 99 ? "" : "0") + iconNumber + ".gif"}
else if ( formName == "fmPersContact" )
{ "" }}]]></xp:this.iconSrc>
The problem is when I want to open a document listed from my viewPanel, I get the following error: Exception occurred calling method NotesXspViewEntry.getDocument() null
at the following line of code:
var formName = rowData.getDocument().getItemValueString("Form");
Upvotes: 1
Views: 636
Reputation: 3355
From the documentation for NotesXspViewEntry.getDocument()
Returns null if the view entry is not a document. Returns null if the document is deleted after the NotesXspViewEntry (JavaScript) object is created.
I don't think deletion is the problem but it might be a category or total. Check with isDocument()
if(rowdata.isDocument()) {
var formName = rowData.getDocument().getItemValueString("Form");
// other stuff...
}
Upvotes: 7