tags:

views:

2927

answers:

5

hi can any one please tell me how to insert a space character in the jsf field like how we does it html by using  ? is there any tag in jsf?

thanks Suresh

A: 

This should do the trick:

& nbsp;

Note I inserted the space between the & and the n, this should not be there but stackoverflow screws it up.

Tom
A: 

Eventually, you can try this one, if just using   fails...

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

(like Tom, I added a space between & and nbsp; )

romaintaz
+7  A: 

this will work

<h:outputText value="&#160;" />
Madhu
+1  A: 

If your using the RichFaces library you can also use the tag rich:spacer which will add an "invisible" image with a given length and height. Usually much easier and prettier than to add tons of nbsp;.

Where you want your space to show you simply add:

<rich:spacer height="1" width="2" />
ChrisAD
+1  A: 

Putting the HTML number directly did the trick for me:

&#160;
luiggitama