Hi,

See the lasts comments here:
http://wanderingcanadian.posterous.com/hello-mvp-with-gin.

<http://wanderingcanadian.posterous.com/hello-mvp-with-gin>Regards,
Juan

2011/3/3 Alex D. <[email protected]>

> @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 -
>
> public Activity getActivity (Place place)
>    if (place instanceof GoodbyePlace) { ..... }
>
> 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 <[email protected]> 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 [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.
>
>

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