On 5/31/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:
> * Johannes Schneider:
>
> > can anyone tell me how I can escape German umlauts when using
> > TextFields or Labels? Component.setEscapeModelStrings( true)
> > does not replace them. And I really don't want to create a
> > custom IModel for every component I add....
>
> Have a look at Strings#escapeMarkup(String, boolean, boolean)
>
> The last argument is called convertToHtmlUnicodeEscapes and by
> reading the Javadoc I think it does what you want.
I just changed getModelObjectAsString:
if (getFlag(FLAG_ESCAPE_MODEL_STRINGS))
{
// Escape it
return Strings.escapeMarkup(modelString, false,
true).toString();
}
This seems to better anyway, and I couldn't find any nasty side
effects, nor did any of the unit tests fail. Johannes, can you confirm
this fixes your problem?
Thanks,
Eelco
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user