dominoGuru.com
Your Development & Design Resource
This is an XPage...
11/18/2010 08:55 AM by Chris Toohey
With a custom Theme, RAD-generated Form suppression via a dropdown, and a single line of text in the xsp.properties, I now have complete control over my IBM Lotus Notes Domino XPage... and thus I have complete control over my apps. +1 for the future of the platform!
And here's the how-to:
-
Step 1: Custom Theme
Create a new theme. I called it custom, but the name doesn't really matter.
Since you don't want to include the webstandard Stylesheets, you'll remove the
extends="webstandard"
attributes from the Theme, and save what is basically a blank Theme. -
Step 2: Using the Custom Theme
From the Application Properties (in the XPages Tab), you'll set the custom Theme... which is now available via the Theme: dropdown/combobox.
-
Step 3: Killing Dojo
I'm not a huge fan of Dojo. Don't get me wrong, it's fine for RAD, but it can be overkill sometimes... so I tend to kill it.
Add the following line to the xsp.properties of your NotesDatabase (available from the Package Explorer):
xsp.client.script.libraries=none
(Note: You could have skipped step two and added the following line directly to the xsp.properties to define the Theme:
xsp.theme=custom.theme
. -
Step 4: Creating your no-Form XPage
This one is simple, and can be done from either the Properties or the Source Panes.
-
Properties
From the All Properties section of the XPage Properties, find the
Basics\createForm
Property and set it to false. -
Source
From the Source Pane, add the
createForm="false"
Attribute to the xp:view Node. -
Step 5: Hello World!
Here's my oh-so-amazing XPage markup, so show you that there's no trickery involved:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" createForm="false">
Hello World!
</xp:view>
Pretty simply, huh? With 5 (rather verbose) Steps, you can do in XPages what you could only do previously with unsupported hacks: have absolute and complete control over your NotesDatabase applications!