How do I insert non breaking space character   in a JSF page?

前端 未结 11 1951
南旧
南旧 2020-12-12 20:44

How do I insert a non breaking space character in JSF page like I can in HTML using  ? Is there such a tag in JSF?

相关标签:
11条回答
  • 2020-12-12 21:19

    just to add to options: <h:outputText value="&amp;nbsp;" escape="false"/> worked

    0 讨论(0)
  • 2020-12-12 21:20

    this will work

    <h:outputText value="&#160;" />
    
    0 讨论(0)
  • 2020-12-12 21:27

    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" />
    
    0 讨论(0)
  • 2020-12-12 21:31

    The easiest way is:

    <h:outputText value=" " />
    
    0 讨论(0)
  • 2020-12-12 21:37

    Not necessary to give 160 . 141 will also work. For the value field provide value="&#141" .

    0 讨论(0)
  • 2020-12-12 21:38

    Putting the HTML number directly did the trick for me:

    &#160;
    
    0 讨论(0)
提交回复
热议问题