Questions tagged [gwt-gin]

GIN brings automatic dependency injection to GWT client-side code.

GIN (GWT INjection) brings automatic dependency injection to Google Web Toolkit client-side code. GIN is built on top of Guice and uses (a subset of) Guice's binding language.

195 questions
3
votes
1 answer

Using static class instead of client factory or dependency injection with gin?

In GWT MVP my presenters typically have a lot of private members (event bus, rpc, message bundles created with GWT.create()...). We have been using a "ClientFactory" to generate views as singleton, so they won't be recreated each time we need them.…
Olivier Tonglet
  • 3,312
  • 24
  • 40
3
votes
1 answer

GIN AssistedInject issue with factory "Unable to create or inherit binding"

I am getting an strange error which I cannot get past when using Assisted Injection: [DEBUG] [project] - Rebinding com.gwtplatform.mvp.client.DesktopGinjector [DEBUG] [project] - Invoking generator com.google.gwt.inject.rebind.GinjectorGenerator …
Casey Jordan
  • 1,204
  • 1
  • 20
  • 39
3
votes
1 answer

PostgreSQL tsvector parse include xml tags in search

We store "broken" xml in a text field in a table. Fixing xml is not currently possible, so normal use pattern is to search through it using ~* E'my_regex' in where clause. The challenge is that size of the table is very very large. I am trying to…
alex_123
  • 211
  • 1
  • 2
  • 7
3
votes
1 answer

GWT: Provider vs AsyncProvider

what is the difference between provider and AsyncProvider in GWT. My understanding is that both are used for code splitting and delayed instantiation. so I am not able to decide, in which case we go for Provider and not for AsyncProvider ? Thanks…
bhargava
  • 49
  • 1
  • 5
3
votes
1 answer

JUnit test with GIN injection, without GWTTestCase and overloading gin modules?

I designed a new project using Guice/Gin so I could make our code more modular and swap-able especially when testing. However, I am not able to find out how to make this work in practice. I was under the impression that I could just create a new…
Casey Jordan
  • 1,204
  • 1
  • 20
  • 39
3
votes
2 answers

Can I pass arguments into GWT Module constructor?

I have the following GWT module: public class FizzModule implements EntryPoint { private Buzz buzz; public FizzModule() { this(null); } public FizzModule(Buzz bz) { super(); setBuzz(bz); } …
user1768830
3
votes
1 answer

retrieving keys from a GIN index on a tsvector column in Postgres 9.1

I've got a collection of documents that I'd like to do some full text searching on in Postgres 9.1, so adding them as the contents of a tsvector and then creating a GIN index on this column seems straightforward enough. My understanding of the GIN…
3
votes
1 answer

Injecting an instance using Gin/Guice

I typically have this kind of code pattern in my GWT project: Menu errorMenu = new Menu(user, userController, -1); Menu searchMenu = new Menu(user, userController, 0); errorView.setMenu(errorMenu); searchView.setMenu(searchMenu); How do I inject…
quarks
  • 33,478
  • 73
  • 290
  • 513
3
votes
2 answers

GWT application runs in dev mode but fails to compile

My GWT app works in development mode but when I compile I get this error: [ERROR] Errors in generated://F1C9BA113391FC353E7321372D77396D/com/mygwtapp/client/gin/ClientGinjectorImpl.java' [ERROR] Line 64: Rebind result…
quarks
  • 33,478
  • 73
  • 290
  • 513
2
votes
1 answer

Can't marry GIN and custom bean validator in GWT application (compiler error)

Could you guys help me marry GIN and custom bean validator in GWT application (GWT 2.4) ? GWT compiler gives me following errors: Rebind result 'javax.validation.ValidatorFactory' must be a class Rebind result…
expert
  • 29,290
  • 30
  • 110
  • 214
2
votes
1 answer

GWT GIN Field Level Injection

We are evaluating using GIN in out GWT project and have had good results with typical injection via constructor arguments. The thing we have had difficulty with is field level injection. The fields always end up being null. Does anyone have a…
mreynolds0404
  • 183
  • 1
  • 13
2
votes
1 answer

How to debug Ginjector?

I have a Ginjector: @GinModules(FooGinModule.class) public interface FooGinjector extends Ginjector { ... PlaceHistoryHandler historyHandler(); } Whenever I call injector.historyHandler(), I get a null pointer exception. (The injector itself…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
2
votes
1 answer

Gin not finding @Provides method

Here is my Gin module: public class FooGinModule extends AbstractGinModule { @Override protected void configure() { ... bind(ActivityManager.class).asEagerSingleton(); ... } @Provides @Singleton public ActivityManager…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
2
votes
2 answers

Using @Singleton in two Ginjector instances

I have circural dependency problems in a GWT project set ("Main project", "Widgets project", "Service adapter project"). Main references widgets and service adapters. Widgets reference service adapters. And here comes the problem. I would like to…
jabal
  • 11,987
  • 12
  • 51
  • 99
2
votes
1 answer

Binding generated classes in gin

I am trying to dynamically generate some set of event handlers (using com.google.gwt.core.ext.Generator subclass). The whole generation process works fine, my generated handlers accepts EventBus via setter injection (@Inject annotation) and the…
omnomnom
  • 8,911
  • 4
  • 41
  • 50