Hi Michał,

if you need the string of a ResourceModel you may want to call: new
ResourceModel("key").getObject().toString().

cheers,
Witold

Am Tue, 14 Apr 2009 11:07:05 +0200
schrieb Michał Letyński <[email protected]>:

> Hi.
> When im getting localized string in constructor via getString method the 
> warning message is dispalyed: "Tried to retrieve a localized string for 
> a component that has not yet been added to the page. "
> 
> I know that one possible way to "fix" this is to use 
> ResourceModel("key'). But what if i cant use ResourceModel ? for e.g 
> some component want String directly. Is there a better solution then 
> using: 
> "Application.get().getResourceSettings().getLocalizer().getString(resourceKey,
>             (Component)null, defaultValue);
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to