Im new to wicket. Why doesn't /n add a new line to a string in a panel component? the /n just gets left out and the string continues as normal.
Its because its rendered as HTML and HTML does not recognize \n
as new lines. Instead it is treated as a normal white space.
If you want a new line, insert a <br>
into your string and use setEscapeModelStrings(false)
on your component.
Or if your component is a label, you can consider using MultiLineLabel
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With