All blog posts, code samples and downloads licensed under Apache License 2.0.

Release dependant OneUI theming

Oliver Busse on 30.06.2013 12:28:53 CEDT, filed under SSJS XSP 

With the help from Mark Leusink and Knut Hermann I made this custom control. It switches between 2 custom themes (or even the built-in themes) depending on the release of your server.

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="">
	<xp:this.beforePageLoad><![CDATA[#{javascript:var theme = session.getNotesVersion().startsWith("Release 8") ? "themeR8" : "themeR9";
if ( ! theme.equals(context.getSessionProperty("xsp.theme"))) {
	context.setSessionProperty("xsp.theme", theme);

Both custom themes should use either the oneuiv2.1 or oneuiv3.0.2 theme.

Read the full story on Stackoverflow here.

Tagged with theme oneui