David Delbecq wrote:
Hi, if you want "literally" the four character & n b s p ; in the
output, you must do this:

<h:outputText value=”&amp;nbsp;” escape=”false”/>

Or write a tag (easy in facelets) so that you can do <n:bsp/>
or similar.

the &...; entities are read by xml parser and never seen by facelets,
moreover the xml parser itself has no notion of the &nbsp; entity and
will fail to parse it

Not true, as &nbsp; is defined in the XHTML DTD. As long as the
doctype references this, the XML parser understands it.

The problem seems to be that the &nbsp; entity is being treated as
whitespace, and therefore eliminated from the XML tree, but numeric
entities are treated as text, and get built into the component tree
by facelets.

However, non breakable space is only a special character, that is also
reachable via it's unicode value, so you can simply write

&#xA0;

instead of all the awfull outputText thingy. It will not issue a &nbsp;
in the output html but will issue a non visual character having same
behaviour.

The XHTML standard mandates that hex references must use lower
case, so you should really put &#xa0; (or use non-hex i.e. &#160;),
but most browsers would understand upper case I guess.

En l'instant précis du 21/03/07 14:54, Charbel Abdul-Massih s'exprimait
en ces termes:
I am using JSF with facelets…

I just need to output a space character “&nbsp;” in my page…


--
.....................................................................
          Dr Jonathan Harley   .
                               .   Email: [EMAIL PROTECTED]
           Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
           www.parkplatz.net   .   Mobile: 079 4116 0423

Reply via email to