Re: String Resource Loading from DB

2010-04-22 Thread Josh Glassman
Ah, right... we got around that by not using the class (partly so we could use the same resource strings across different classes). The only other thing I can suggest is to use more unique keys for anonymous classes, though that is clearly not ideal. Maybe someone else knows a better solution. O

Re: String Resource Loading from DB

2010-04-22 Thread Zilvinas Vilutis
the combination of class, key, locale, style must be unique, so if I have the same keys ( while locale and style is not changing ) - the classname must be unique. So I cannot use this in anonymous classes, as it does not resolve, e.g. page class name Žilvinas Vilutis Mobile: (+370) 652 38353 E

Re: String Resource Loading from DB

2010-04-21 Thread Josh Glassman
Not sure what you mean about implementing a unique class... any class which inherits from Component can call getString(String key), which will call your custom IStringResourceLoader. Additionally, you can set the locale on any MarkupContainer or the Session, and Components will use their parent's

Re: String Resource Loading from DB

2010-04-20 Thread Zilvinas Vilutis
Yes, That seems to work. Although each component which needs to be localized needs to implement a unique class, 'cause in many cases the Component class is "WebMarkupContainer" ( if we use components in list & etc ). Does anyone have practice on using any performance experience on that? Do you u

Re: String Resource Loading from DB

2010-04-20 Thread Josh Glassman
Yup, you have the right idea. Something like... public class DatabaseStringResourceLoader implements IStringResourceLoader {...} And then in your WebApplication.init()... getResourceSettings().addStringResourceLoader(new DatabaseStringResourceLoader()); Cheers, Josh

String Resource Loading from DB

2010-04-19 Thread Zilvinas Vilutis
Has anybody had implemented smth like that ( @see topic ) and / or had any practice with this? I'm looking for a resource loading solution for quite a big web-site project which would be localized to many languages and may need to require update at runtime using some administration panel. Or is t