How to display a line break with outputText?

前端 未结 3 1919
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 20:35

I need to render a line break using outputText so that I can utilize the rendered attributed. I tried



        
3条回答
  •  执笔经年
    2021-01-30 21:04

    That's indeed not valid since Facelets because it's syntactically invalid in XML. You'd need to manually escape the XML special characters like <, > and so on.

    
    

    You can however just emit the
    in template text without the need for a .


    To render it conditionally, wrap it in for example a .


    A is also valid as it doesn't emit anything to the HTML anyway.


提交回复
热议问题