Based on this snippet (http://openntf.org/XSnippets.nsf/snippet.xsp?id=oneui-on-the-fly-theme-changer) I tried to calculate the theme depending on the release of Domino. I'd like to use "oneuiv2.1" on Domino<9 and "oneuiv3.0.2" on a 9 release.
EDIT: To be clear: I already can identify the version, the question is about calculating and setting the theme at the right time as my following approaches seem to do the work too late. The page renders and then the theme is set - however this is my impression.
These were my first approaches:
- Calculate the theme name in the "extends" property of the theme - didn't work.
- Calculate and set the value of the session property "xsp.theme" in a beforeRenderResponse and beforePageLoad event of my Xpage - this also failed
- Set up a bean to calculate the value and set the session property when the bean is initialized - same result
Of cause you can calculate (render) all the needed stylesheets and scripts of OneUIv2.1 and OneUIv3 in the theme file but hey, this is quite a hassle with that amount of resources, isn't it?
So my question is: do you have any other ideas how to achieve this? This would be very handy to use if your applications can use both themes with the same layout, independent where the application runs - whether on a 8.5.x or 9 machine.
Looking forward to the discussion :-)