it is for a patch proposal for HtmlFormRenderer. so in screen widgets.

Thank you

"David E Jones" a écrit le 17/11/2006 23:18 :

It depends on where the code is being run.

The first is better to use, but is generally only available from code run through the Screen Widget as the uiLabelMap is generally defined in screen actions and is initialized through a UtilProperties call on a per-screen-render basis.

-David


On Nov 17, 2006, at 3:08 PM, Jean-Sébastien Hederer wrote:

In order to include a text coming from a *.properties file, is it better to use :

   Map uiLabelMap = (Map) context.get("uiLabelMap");
   localizedTitle = (String) uiLabelMap.get("CommonViewCalendar");

or to use:

   Locale locale = (Locale)context.get("locale");
   localizedTitle = UtilProperties.getMessage("CommonUiLabels",
   "CommonViewCalendar", locale);

Thanks in advance

JSH






Reply via email to