Software Developer and Performance Engineer
JSF
Putting space between things in JSF
Mar 9th
Sometimes the simplest things are made difficult due to using a framework. Recently I was asked to put some space around some checkboxes. Normally I would do this in CSS and be done 20 seconds later. I am not allowed to touch the CSS though so I had to find a way to do it with JSF tags. It is simple really, but sometimes it is the simple things that give us a lot of trouble.
<h:outputText value=" " escape="false" />
That is all. You don’t really need the spaces around the html entity for a non-breaking space, but I needed more room. Don’t forget to set escape to false. Otherwise it will show the text on the screen instead of allowing the browser to show the fixed space you were hoping for.

