On 24 oct, 10:22, bmalkow <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I have two interfaces:
>
> public interface Module1 extends Messages {
> @Key("logindialog.username")
> String username()
>
> }
>
> public interface Module2 extends Messages {
> @Key("useredit.fullname")
> String fullname()
>
> }
>
> Is there a way to load keys from one file? I need to have one
> properties file with messages to Module1 and Module2
> Is this possible?
Depends how you're instantiating the classes/interfaces...
public interface _Modules extends Module1, Module2 {
_Modules INSTANCE = GWT.create(_Modules.class);
}
public interface Module1 extends Messages {
Module1 INSTANCE = _Modules.INSTANCE;
@Key("logindialog.username")
String username();
}
public interface Module2 extends Messages {
Module2 INSTANCE = _Modules.INSTANCE;
@Key("useredit.fullname")
String fullname();
}
I'm successfully using thisn approach with ImageBundles (to generate a
single PNG image while working with several ImageBundle interfaces in
my code).
In the above case, the .properties file will be "_Modules.properties".
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---