Hi,
You have to override #newLabel like this:
@Override
protected Component newLabel(String id, IModel model)
{
return super.newLabel(id,
model).setEscapeModelStrings(false);
}
Hope this helps,
Sebastien.
On Wed, Nov 18, 2015 at 5:43 PM, smoothe19
wrote:
> How can I add line breaks in the message content of a message dialog?
>
> I have tried
> String message = "Text here: More text " ;
> Dialog.setEscapeModelStrings(false);
> Dialog.setModelObject(message);
>
> failed to work
>
> HTML:
>
>
> java:
> private void createDialog(){
> Dialog = new MessageDialog("dialog", "Information", "Text Here
>
> Text",
> DialogButtons.YES_NO, DialogIcon.WARN) {
>
>
> public void onClose(AjaxRequestTarget target, DialogButton button)
> {
>
>
> }
>};
>
> add(Dialog);
> }
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Adding-line-breaks-in-MessageDialog-tp4672659.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>