Formatting of flash feedback messages in Apache Wicket

46 Views Asked by At

Is it possible to format (internationalized) flash feedback messages in Apache Wicket? Specifically, I need to break a longer error message to separate lines but can not find a way to do it...? (html tags do no work and any other way to include a new line either)


Edit

 public static void messageError(Page page, String messageText) {
    page.error(messageText);
}

The error method accepts only a string not a model, so setEscapeModelStrings(false) does not work here.

1

There are 1 best solutions below

1
Andrea Del Bene On BEST ANSWER

you can use HTML tags to format your message (es: <br>) but you need to invoke setEscapeModelStrings(false) on the component in order to avoid html escaping