I’m familiar with setting XSP properties in xsp.properties at the application or server level and I’ve used tags to do the same within a theme, but I did not realize until recently that you can also set these properties at the XPage level to override the broader settings on a page-by-page basis.
Select the root tag for the page and go to
All Properties
in the Properties view. Under the data
subtab, click on properties
and click the plus (+
) button to add a property.
This adds a new parameter and defaults the name attribute to param
and the value attribute to val
. In the source, it adds an xp:this.properties
tag containing an xp:parameter
tag.
Let’s see this in action with a few examples.
Here’s the first fiew lines of a brand new, unmodified XPage on my test server. The application leaves the server defaults for the HTML doctype and character set (although the latter is not visible in this output).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title></title>
If you want to add a meta
tag to the page that displays the doctype and character set, you can add the xsp.html.meta.contenttype
property to the page and set its value to true.
You can also override the HTML doctype and character set for the page with additional properties. (Click on the picture to enlarge.)
Here’s the updated first few lines of output, including the meta
tag and reflecting the updated doctype and character set:
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title></title>
There are many more properties that can be modified at the page level (though not all of them). If you have the XPages Portable Command Guide, you can find them all described in depth there (The book covers through 8.5.3. Sven Hasselbach has a good post on some new properties that were added in Notes 9.)
It appears that you can similarly modify properties at the custom control level, but I have not tested the effectiveness or how conflicts are handled.
