dominoGuru.com

Your Development & Design Resource

Warning: XPages Image Resource Control aliased Image Resource rendering in the IBM Lotus Notes 8.5.1 Client

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.

Multi-aliased Image Resource Properties in Domino Designer in Eclipse 
8.5.1

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:

Google Chrome vs. IBM Lotus Notes 8.5.1 Client rendering of an XPage Image 
Resource Control using multi-aliased Image Resources

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!


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.