Yes i am using rpc, and the key is available to the client side.

On Mon, Jan 25, 2010 at 3:17 PM, Thomas Broyer <[email protected]> wrote:

>
> On Jan 25, 2:09 pm, mariyan nenchev <[email protected]> wrote:
> > Hi,
> >
> > We are rewriting our front end module. For notification/error messages
> > coming from the server we are using error codes passed with exceptions.
> For
> > example throw new MyException(EKeys.SOME_STRING_ERROR_CODE)
> > And we were using properties file to load the messages. With gwt&i18n
> this
> > is a little different. With gwt we have to define the message in
> interface
> > that extends com.google.gwt.i18n.client.Messages. But we do not want to
> > rewrite the whole server side in order to do that. Any ideas how to keep
> the
> > old way (throw new MyException(EKeys.SOME_STRING_ERROR_CODE)// goes to
> > onFailure for example) with i18n?
>
> Have a look at ConstantsWithLookup (which obviously doesn't support
> parameter formatting the way Messages does), it allows you to get a
> constant by key, when you don't know the key at compile-time.
> Now, I don't know whether you are using GWT-RPC or not, and if GWT-
> RPC  (having never actually used it) whether the key would be
> available on the client side (though I think it would).
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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.

Reply via email to