XPages

How to add non breaking spaces to your XPages

Often when you're designing a web page, you'll need a space between elements (such as two field labels for example). Most of the time you should solve your UI issues with CSS, but sometimes that is not the correct answer. Enter   this is a the classic non breaking space that you can use in HTML.

Unfortunately you cannot use that in your XPages source because it is not valid XML, so instead, we just have to use:

 

160 is the decimal character code for the non breaking space and use of character code markup like this is valid in XML.

A very simple tip, but a useful one none the less.