Yes add(new Label("output","<h1>Hello</h1>")) returns "this" which is
the current component/page. Then, you're calling
setEscapeModelStrings(false) on that, which is not what you want. You
want:
add(new Label("output","<h1>Hello</h1>").setEscapeModelStrings(false));
Igor's example had the double end parens because he was using a PropertyModel.
On Mon, Oct 26, 2009 at 4:43 PM, Jason Novotny <[email protected]> wrote:
>
> Try changing
>
> add(new Label("output","<h1>Hello</h1>")).setEscapeModelStrings(false);
>
> to
>
> Label label = new Label("output","<h1>Hello</h1>");
> label.setEscapeModelStrings(false);
> add(label);
>
> Jason
>
> NiJK wrote:
>>
>> igor.vaynberg wrote:
>>
>>>>
>>>> Also, despite the setEscapeModelString(false), all the HTML is escaped.
>>>>
>>>
>>> that is pretty weird. i just tried and it worked fine for me...
>>> -igor
>>>
>>>
>>
>> Igor,
>>
>> Thanks for the info about setStripWicketTags(true).
>>
>> Something as simple as add(new
>> Label("output","<h1>Hello</h1>")).setEscapeModelStrings(false);
>> is rendering as
>> <h1>Hello</h1>
>>
>> I take it you're not seeing the same?
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]