See the lasts comments here: http://wanderingcanadian.posterous.com/hello-mvp-with-gin.
Juan
-- 2011/3/3 Alex D. <alex.dobjanschi@gmail.com>
@AnnotatedWith is the annotation you're looking for. or @Named, but
personally I do prefer the first one.
http://code.google.com/p/google-guice/wiki/BindingAnnotations
Basically what you can do is replace the code below -
if (place instanceof GoodbyePlace) { ..... }
public Activity getActivity (Place place)
with
public Activity getActivity (@GoodbyePlace Place place) {
return new GoodbyePlace ((GoodbyePlace) place, clientFactory);
}
You will probably notice I've changed the method a bit, the
implementation selection decision (whether the method returns a
GoodbyePlace or something else) is not there anymore. So you will need
to adjust to this.
The change is a bit more subtle, you're exchanging runtime type info
with static compile time GIN functionality.
Alex D.
On Mar 2, 1:22 am, ciosbel <andrew...@gmail.com> wrote:
> https://groups.google.com/forum/#!topic/google-web-toolkit/LtGZpCxQAVY
> might help?
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment