Your Development & Design Resource
Use the Aptana iPhone Emulator with IBM Lotus Notes Domino XPages
05/13/2010 08:52 PM by Chris Toohey
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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Aptana iPhone XPages Launcher</title>
<input type="text" name="url" id="url" />
Simply add your XPage URL to the
url field and click on the
button, which will redirect the embedded browser object to the
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.
... 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.