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



Aug 11, 2011, 5:51 AM
38 Posts

Image rendering in "Preview in Notes" and "Preview in Web Browser"

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: Xpage,image
  • Replies: 2
Lets say we have a XPage with following code snippet which displays an image using javascript formula:
 
<xp:image id="image1"><xp:this.url><![CDATA[#{javascript:"actn005.gif"}]]></xp:this.url></xp:image> 
 
NOTE: actn005.gif is present in the current database as image resource. 
 
When I click on the "Preview in Notes" and get the source it displays something like this for Image:
 
<img id="view:_id1:image1" src="/xsp/Naveen/Experiments.nsf/xsp/actn005.gif" alt="" class="xspImage">
 
When I click on the "Preview in Web Browser" and get the source it displays something like this for Image:
 
<img id="view:_id1:image1" src="/Naveen/Experiments.nsf/actn005.gif" alt="" class="xspImage"> 
 
You can see that in case of "Preview in Notes" it adds xsp before and after the path of the database. My question is WHY? The image displays in both cases with no issues. But I have an XPage which renders image lets call it - XPage_Rendering_Image.xsp. Because of the XPage code:
 
<xp:image id="image1"><xp:this.url><![CDATA[#{javascript:"XPage_Rendering_Image.xsp"}]]></xp:this.url></xp:image> 
 
renders as: 
 
<img id="view:_id1:image1" src="/xsp/Naveen/Experiments.nsf/xsp/XPage_Rendering_Image.xsp" alt="" class="xspImage"> 
 
and then it FAILS!  Has anyone encountered this problem before? If yes then is there a solution for this? 
Aug 15, 2011, 12:52 PM
272 Posts
Re: Image rendering in "Preview in Notes" and "Preview in Web Browser"
 You can add an image by using a normal <img>-Tag:
 
<img src="#{javascript:'XPage_Rendering_Image.xsp'}" alt="" class="xspImage" />
 
 
Sven
 
Aug 15, 2011, 1:26 PM
38 Posts
Re: Image rendering in "Preview in Notes" and "Preview in Web Browser"
 It worked!
 
But I guess this is a bug... This SHOULD work on Notes client. If we have to write our own tags for IMG then whats the use of XPages!!  :) 

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