dominoGuru.com
Your Development & Design Resource
Warning: XPages Image Resource Control aliased Image Resource rendering in the IBM Lotus Notes 8.5.1 Client
05/20/2010 12:45 PM by Chris Toohey
Came across this bug, which I promptly reported, where aliased Image Resources are not rendered via the XPage Image Resource Control in the IBM Lotus Notes 8.5.1 Client. Might want to pay attention, as you'll more than likely run into this if you are developing XPage-based Lotus Notes Client apps, and use any aliases for your Image Resources.
Above I have a very simple PNG (but I've confirmed this is the case with JPG, and GIF formats as well) multi-aliased, resulting in the following title:
image.png|image2.png|image3.png
My XPage source is pretty simple:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<p align="center">
Using image.png...
</p>
<p align="center">
<xp:image>
<xp:this.url><![CDATA[#{javascript:"/image.png"}]]></xp:this.url>
</xp:image>
</p>
<p align="center">
Using image2.png...
</p>
<p align="center">
<xp:image>
<xp:this.url><![CDATA[#{javascript:"/image2.png"}]]></xp:this.url>
</xp:image>
</p>
<p align="center">
Using image3.png...
</p>
<p align="center">
<xp:image>
<xp:this.url><![CDATA[#{javascript:"/image3.png"}]]></xp:this.url>
</xp:image>
</p>
</xp:view>
So, if you follow the XPages XML, each XPage Image Resource Control is using
one of the totally valid names for the same Image Resource. This works
wonderfully on the Web Browser Client (even rendered via Internet Browser
Preview in DDE), but the problem is specific to the XPage Image Resource
Control rendering in the IBM Lotus Notes 8.5.1 Client.
It doesn't
recognize the aliases!
Here's a side-by-side comparison of a Web Browser rendering (Google Chrome) and the IBM Lotus Notes 8.5.1 Client:
As I mentioned, this issue has been reported, and I'll update this
post when I get the SPR number SPR: PHAN85MKUC. Until
it's addressed, the work-around is to create non-aliased Image Resources if you
plan on using an Image Resource in an XPage-driven IBM Lotus Notes Client app.
Not a big issue, but I suspect that this will trip up new XPage developers that
are using aliases for their Image Resource Design Elements -- it certainly made
me question my code when I stumbled onto the problem!