No - any data structures you share with client side obviously cannot use
non-GWT code. Thus you have to provide getters & setters for the server
code.
An optional abstraction would be to something like:
interface class C extends Constants
{
String bar();
}
on client side:
MyClassFoo foo = new MyClassFoo(GWT.create(C.class));
on server side:
class D implements C {
String bar() {
// resource bundle lookup
}
}
MyClassFoo foo = new MyClassFoo(new D());
class MyClassFoo {
MyClassFoo(C i18n) {
}
}
Optionally, you can use guice instead of doing a new D().
On Thu, Apr 23, 2009 at 9:51 AM, olel <[email protected]> wrote:
>
> That's what I ment yesterday by setting the strings into the classes
> that are used on the client.
> The exception might be an example where the text can be set via
> constructor, but there are others where it is very unaesthetic at
> least. Unfortunately I think that there would be no other way, would
> it?
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---