Reputation: 842
I want to change the view column header's value in Xpage...
I have used the following code
getComponent("viewColumnHeader1").setValue("Test")
But the above code throws the getComponent() is null
error...
Upvotes: 2
Views: 315
Reputation: 911
Why not just compute the "Label" property for column header to begin with:
<xp:viewColumn columnName="fldTest" id="viewColumn1">
<xp:viewColumnHeader value="testing" id="viewColumnHeader1"></xp:viewColumnHeader>
</xp:viewColumn>
Hope this helps.
Upvotes: 2
Reputation: 3757
Your code is correct but the problem is probably in where you've placed it.
Just performed a quick test and the code works if you place it in the afterPageLoad event of an XPage containing the view/ header.
Upvotes: 1