users@glassfish.java.net

Re: JSF Facelets Whitespace trimming

From: <glassfish_at_javadesktop.org>
Date: Wed, 27 Feb 2008 06:22:36 PST

Thanks Florent!

Here's a quick roundup to what I've found to help others.

A xHTML is effectively a strict XML document. When Facelets (also possibly true of all JSF pages) reads it in it will parse the XML document and all strings will be automatically trimmed. Therefore, a non-breaking space will have to be inserted.

Unfortunately, generally XML parsers struggle with:
[code] &amp;nbsp;[/code]Therefore the numerical version of a non-breaking space should be used:
[code] &amp;#160;[/code]

Does that sounds about right?

Dan
[Message sent by forum member 'dansiviter' (dansiviter)]

http://forums.java.net/jive/thread.jspa?messageID=261168