dominoGuru.com

Your Development & Design Resource

Use the Aptana iPhone Emulator with IBM Lotus Notes Domino XPages

I wanted to be able to quickly test an XPage within the relative layout and rendering of an iPhone tonight, but without having to crank up a device emulator. Thankfully, Aptana has a solution that suites me just fine. See, I already have Aptana open when I'm working in XPages as I tend to write my layouts in XHTML, and then paste them directly into the XPage Source Pane as pass-thru markup.

The solution? Aptana has a simple iPhone Preview option available, and despite it not being perfect it's certainly decent enough for mock-up work or to give you an idea of how your content will basically look on an iPhone portrait or landscape screen.

So how do I get my actual XPage to render within the Aptana iPhone Emulator? Well, there are two ways to get the job done really. One is the more configurable-based option, which requires you to create a new Preview option with a static URL.

Quite frankly, it's too much work for me.

So I thought about what Aptana is actually doing... which is to create an embedded browser object-style emulator for each configured Web Browser (IE, Mozilla, and of course the iPhone). So why not create a simple HTML Form to make my life easier?!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>Aptana iPhone XPages Launcher</title>
    </head>
    <body>
        <input type="text" name="url" id="url" />
        <input type="button"
            onclick="window.location =
                document.getElementById('url').value;"

        />
    </body>
</html>

The result:

Aptana 
iPhone XPages Launcher

Simply add your XPage URL to the url field and click on the button, which will redirect the embedded browser object to the supplied URL!

Use the Aptana 
iPhone Emulator with IBM Lotus Notes Domino XPages

Now, as I mentioned, this is not a true test of what the XPage will look like on the iPhone (yet!).

Aptana currently gives you two options as far as which Web Browser to use in the embedded browser object: IE and Mozilla.

I believe there are plans in an upcoming release of Aptana to support WebKit-based Web Browser rendering kits -- such as Safari or Chrome (pictured below) -- which would solve this problem and give you a much more accurate representation.

Use Chome with 
IBM Lotus Notes Domino XPages

... but again, this beats bugging a buddy who has an iPhone every time you get curious as to how your latest XPage layout will render over one of the world's most popular mobile devices!

Y'know... if you don't have an iPhone.


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.