Skip to content

Allow Gin bindings to depend on GWT properties #150

Open

Description

@GoogleCodeExporter
Issue 129 now makes it easy to specify a Gin module in a GWT module .xml file. 
However, it is still impossible to make a binding depend on a GWT property 
(such as, say, `user.agent`). As a result, the only way to instantiate 
browser-dependant classes is to leave it unbound and rely on Gin using 
GWT.create() to create them. The drawback is that any injected field is left 
uninitialized.

I'm not sure of the best way to enable that feature. Things we could consider, 
from simple (but less interesting) to more involved:
  * Injecting @inject fields in classes instantiated with GWT.create and asking the user the rely on <replace-with>.
  * Conditionally switching Gin modules based on GWT properties
  * Having some kind of conditionalBind() mechanism.

Original issue reported on code.google.com by philippe.beaudoin on 24 Apr 2011 at 4:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions