You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dirk Forchel <di...@exedio.com> on 2012/11/06 11:30:43 UTC

Button value with escaped Model String

We have a mutli-language Application where Button values are rendered with
wrong and escaped Strings. Therefore our Button components have a default
Model which property is used to set the "value" attribute.
For example in French, the default Model String of a specific button is "S'
abonner" but the rendered value String is "S&#039; abonner". 

Simplified it looks like this:


Just if I set


the Button value is rendered with the correct value (not escaped).
I think, that the method Button#onComponentTag(ComponentTag) should use
getDefaultModelObject() (which is a String) instead of
getDefaultModelObjectAsString().
Or do I miss something?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Button-value-with-escaped-Model-String-tp4653650.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Button value with escaped Model String

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You markup didn't make it and Nabble doesn't have a record for your thread.

You should use button.setEscapeModelStrings(false) if you are certain that
the button's value wont break the produced markup.


On Tue, Nov 6, 2012 at 12:30 PM, Dirk Forchel <di...@exedio.com>wrote:

> We have a mutli-language Application where Button values are rendered with
> wrong and escaped Strings. Therefore our Button components have a default
> Model which property is used to set the "value" attribute.
> For example in French, the default Model String of a specific button is "S'
> abonner" but the rendered value String is "S&#039; abonner".
>
> Simplified it looks like this:
>
>
> Just if I set
>
>
> the Button value is rendered with the correct value (not escaped).
> I think, that the method Button#onComponentTag(ComponentTag) should use
> getDefaultModelObject() (which is a String) instead of
> getDefaultModelObjectAsString().
> Or do I miss something?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Button-value-with-escaped-Model-String-tp4653650.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>