Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnpBootFlatView viewimage fails if getColumnValue returns a null #345

xpagesbeast opened this issue Jun 29, 2015 · 0 comments

UnpBootFlatView viewimage fails if getColumnValue returns a null #345

xpagesbeast opened this issue Jun 29, 2015 · 0 comments


Copy link

@xpagesbeast xpagesbeast commented Jun 29, 2015

When previewing a page in the specific case getColumnValue returns a null when building the 'src' attribute. You get a error page. To rectify the problem, adjust the code to check for a null.

The existing code only checks for "" (empty).

<xp:panel styleClass="img-rounded pull-left" tagName="img" id="viewimage">....
// maybe get value in a var first.
var columnValue = thisRowData.getColumnValue(compositeData.photocolumn);

if (compositeData.photocolumn != null && compositeData.photocolumn != "" && columnValue != "" & columnValue != null){

return thisRowData.getColumnValue(compositeData.photocolumn);

return "unp/ecblank.gif";

This is a quarky issue with Domino Views when you access the column values programmatically.

To generate this bug:
Create view column, put in a string literal or compute some value. Point the photocolumn to this view column using the programmatic name. when the script gets to thisRowData.getColumnValue(compositeData.photocolumn) it will return a null value causing an exception so the page does not load. I tried both programmatic names auto assigned such as $22 and "Photo". always get a null.

If I assign to a field to the view column that is in the document, a value is returned, no errors occur.

NOTE: I am working on showing dynamic photos from another database via URL so I cannot save every url in the document so I can show a photo... if the photo changes, I do not want to go into every document and update it. I will add an enhancement request to support dynamic photos in this control. I have a rough draft working.

@whitemx whitemx added this to the 1.6.0 milestone Feb 25, 2016
@whitemx whitemx self-assigned this Feb 25, 2016
@whitemx whitemx closed this in 3a98359 Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants