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>
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 if I have XPage which renders image lets call it - XPage_Rendering_Image.xsp. Because of which 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! I posted this question earlier on XPages forum and was suggested using a normal image tag like
<img src="#{javascript:'XPage_Rendering_Image.xsp'}" alt="" class="xspImage" />.
But is there a way to make this work using <xp:image> tag? Is this a bug?