OneUI On-The-Fly Theme Changer


<xp:comboBox id="comboBox1"
							value="#{sessionScope.themeSet}" defaultValue="default">
							<xp:selectItem itemLabel="default"></xp:selectItem>
							<xp:selectItem itemLabel="webstandard"
								itemValue="webstandard" />
							<xp:selectItem itemLabel="oneui"
								itemValue="oneui" />
							<xp:selectItem itemLabel="oneuiv2"
								itemValue="oneuiv2" />
							<xp:selectItem itemLabel="oneuiv2.1"
								itemValue="oneuiv2.1" />
							<xp:selectItem itemLabel="oneuiv3.0.2"
								itemValue="oneuiv3.0.2" />



							<xp:eventHandler event="onchange"
								submit="true" refreshMode="complete">
								<xp:this.action><![CDATA[#{javascript:var f = "/"+@RightBack(context.getUrl().getAddress(),"/");
context.setSessionProperty('xsp.theme', getComponent('comboBox1').getValue());
context.redirectToPage(f)}]]></xp:this.action>
							</xp:eventHandler>
						</xp:comboBox>
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...