Hi,
You have to override #newLabel like this:
@Override
protected Component newLabel(String id, IModel<String> model)
{
return super.newLabel(id,
model).setEscapeModelStrings(false);
}
Hope this helps,
Sebastien.
On Wed, Nov 18, 2015 at 5:43 PM, smoothe19 <[email protected]>
wrote:
> How can I add line breaks in the message content of a message dialog?
>
> I have tried
> String message = "Text here:<br/> More text " ;
> Dialog.setEscapeModelStrings(false);
> Dialog.setModelObject(message);
>
> failed to work
>
> HTML:
> <div wicket:id="dialog"></div>
>
> java:
> private void createDialog(){
> Dialog = new MessageDialog("dialog", "Information", "Text Here
> <br/>
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>