How do I put a new line in the message of <p:confirm>
?
<p:confirm header="COnfirmation"
message="Are you sure you want to continue? Bla bla bla"
icon="ui-icon-alert" />
I would like to have "Bla bla bla" to be in a new line.
How do I put a new line in the message of <p:confirm>
?
<p:confirm header="COnfirmation"
message="Are you sure you want to continue? Bla bla bla"
icon="ui-icon-alert" />
I would like to have "Bla bla bla" to be in a new line.
This works for me:
and style:
Message is HTML part, so you need to add
<br>
. Either take message from bean (to prevent xml tag escaping) or use facet:very easy you can use facet
There's no "escape" attribute in
p:confirm
, so you may try this. (Which is work when I tried it.)Page:
Backing Bean:(simply getter and setter)
In this way, you can also take advantage of global
confirmDialog
.However, you may need to edit other commandButtons that show
confirmDialog
.