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

Small Bootstrap buttons

Oliver Busse on 10/24/2014 22:06:18 CEDT, filed under Theme 

If you want all of your buttons look like small buttons in your Bootstrap'ed application then create a theme and add these lines:

<control>
		<name>Button.Command</name>
		<property mode="concat">
			<name>styleClass</name>
			<value>btn-sm</value>
		</property>
	</control>
	<control>
		<name>Button.Submit</name>
		<property mode="concat">
			<name>styleClass</name>
			<value>btn-sm</value>
		</property>
	</control>
	<control>
		<name>Button.Cancel</name>
		<property mode="concat">
			<name>styleClass</name>
			<value>btn-sm</value>
		</property>
	</control>

The control names are taken from this list (http://xpageswiki.com/web/youatnotes/wiki-xpages.nsf/dx/Work_with_themes#themeID+values+for+core+controls) so if you want to define style classes for other elements like links then use the corresponding theme id.


Tagged with css bootstrap xpages xsp theme