Tuesday, June 29, 2010

GWT / GIN: Adding user class to all presenters

I have a hazy understanding of GIN, but have it working for injecting
presenters, etc.

I'm trying to inject a self-made "User" class into all my presenters
in order to get the currently logged-in user.

I've added @Inject to the constructor on my User class, and added User
to my GIN module ... but apart from that, I'm totally lost. Do I bind
it to my app presenter (tried that, but I get an error since User
doesn't extend my AppPresenter)? As a singleton? Is this even the
right way to get pass this data around?

I hate to post this here (not looking for free homework), but I can't
find a decent tutorial/example on this anywhere else.

Much thanks in advance.

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