This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 23, 2011, 9:41 PM
45 Posts
topic has been resolvedResolved

Image URL in Repeat Control

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: End user
  • Tags:
  • Replies: 2
 Hi hope someone can help.
 
I have a repeat control in which I wish to display an image from a different Notes Application. The rowData is bound to a View in the different database, I have no problem displaying Computed Fields from a View Column values, however, I cannot display the image (user photo), as when generating the URL in Javascript it defaults to the current application
 
So this:

<xp:image id="image1" style="height:50px;width:50.0px">

<xp:this.url><![CDATA[#{javascript:"/NCLCMS.nsf/" + rowData.getUniversalID()+ "/$FILE/" + rowData.getColumnValue("attachmentnames")}]]></xp:this.url>

</xp:image>

 Gives this in the browser:
/NCLCusto.nsf/NCLCMS.nsf/F5D28B6FEFEA53408025763B004D858B/$FILE/Music.gif
 
How can I stop the generation of the  NCLCusto.nsf, i.e. the Notes Application which contains the XPage?
 
 Many thanks.
Mark. 
 
May 24, 2011, 12:44 PM
21 Posts
Re: Image URL in Repeat Control
You'll either need to generate a full URL, eg :-

<xp:image id="image1" style="height:50px;width:50.0px">

<xp:this.url><![CDATA[#{javascript:"http://www.example.com/NCLCMS.nsf/" + rowData.getUniversalID()+ "/$FILE/" + rowData.getColumnValue("attachmentnames")}]]></xp:this.url>

</xp:image>

Or do it old school in the form <a href=""><img src=""></img></a>
 
May 24, 2011, 4:14 PM
45 Posts
Re: Image URL in Repeat Control
Many thanks Andrew it worked a treat.
 
So I guess if you don't generate a full URL it adds its own.  
 
Mark 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal