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
0
votes
1 answer

GIN & GWT: Binding Presentation layer with View

I'm trying to bind a GWT view with its presentation layer, but it doesn't seem to be doing anything. It's a Spring Roo GWT generated project and I'm trying to use the scaffold given as far as possible. The view is a simple button (R.ui.xml) and the…
Jan Vladimir Mostert
  • 12,380
  • 15
  • 80
  • 137
0
votes
0 answers

Class bound in gin singleton module, on switching browser tabs, always gets initialized

If I have a class bound in gin which is singleton as: bind(SomeStore.class).in(Singleton.class); While injecting this SomeStore class, it's instance always created new which is not supposed to be. public class SomeStore { private…
0
votes
1 answer

GWT singleton widget being removed from DOM after injection

I have a shared GWT widget "HeaderView" which is a header for all views. I instantiate it through GIN via - bind(HeaderView.class).asEagerSingleton(); I can then inject into my views like so - @Inject public DashboardViewImpl(HeaderView headerView)…
mkeathley
  • 259
  • 2
  • 9
0
votes
1 answer

GWTP ResourceDelegate response undefined

I'm trying to get the response from a REST service from my GWTP presenter. My securityDelegate trigger onSuccess method but the UserDTO seems to be empty. The network tool show me the request with HTTP code 200 and the response with current user.…
s0d
  • 184
  • 1
  • 11
0
votes
3 answers

How do I create this specific PostGres index in a Rails migration?

I’m using Rails 4.2.7 and PostGres 9.5. I’m trying to create a trqm index on my table (to facilitate LIKE searches) so I created this migration class AddTrqmIndexOnRaceTimes < ActiveRecord::Migration def change CREATE INDEX…
user6447029
0
votes
1 answer

Adding inject section in project

i have a problem with gin library. I don't understand how to include it in project. The project is very simple.(I made it for understanding gin, but still don't get it. This project should use gin library) We have first page with button and…
Andrew
  • 591
  • 2
  • 12
  • 33
0
votes
1 answer

Assisted injection error while trying to create presenter

I already used Gin assisted injection a few times but I'm new to gwtp and I'm facing an error message I don't understand while trying to instantiate a PresenterWidget using my factory, even after reading several posts on the subject... [ERROR] Error…
Cyril Dejonghe
  • 171
  • 3
  • 13
0
votes
1 answer

Postgres 9.4 Add INDEX USING GIN

I am using Postgres 9.4, JSONB fields, those are working good. But when I add GIN index doctrine migration fails to created index. class Version20160314132147_Gin_Indexes_content extends AbstractMigration { public function up(Schema $schema) { …
danyal14
  • 367
  • 1
  • 4
  • 18
0
votes
2 answers

How to import com.google.inject.Singleton?

I am learning Gin with GinTutorial and I've stacked on silly problem. In bind(MyWidgetMainPanel.class).in(Singleton.class); Singleton does not exist. I've already tried the following: import com.google.gwt.inject.client.AbstractGinModule; import…
0
votes
0 answers

How to make the result from a request factory call available for for injection using GIN?

I have a proxy, let's call it ConfigParametersProxy. It has a method (for example) String getParameter1(); It is a request factory managed value proxy. I want to be able to do this with it in my java/gwt code... @Inject ConfigParameterProxy…
Michael Wiles
  • 20,902
  • 18
  • 71
  • 101
0
votes
1 answer

Fast querying with gin index on table with column containing XML tags

I have a very large knowledge base(Yago2) with columns that are of the form of XMl tags e.g. ''. Performance is very important in my use case so I created a gin index like that: create index col_idx on yagofacts using…
0
votes
1 answer

Gin. Assisted factory + GWT.create()

As far as I know GIN automatically uses GWT.create() fallback when there is no binding specified. It works perfect when a dependency is injected in a constructor. @Inject public PresenterImpl(ResourceManager manager) {...} Is it possible to…
xRomZak
  • 176
  • 3
  • 10
0
votes
1 answer

Difference between @inject and @mock annotations

In the Context of JUnit, what is the difference between @inject and @mock, and in which conditions both can be used? thanks, Rohit
user1254554
  • 203
  • 1
  • 4
  • 14
0
votes
1 answer

How to get a extended SubClass from Google Gin using GinFactoryModuleBuilder?

The GinFactoryModuleBuilder class comment says the following: In difference to regular Guice Assisted Inject, in Gin, return types in your factory are not further resolved using your regular injector configuration. This means that in the…
Michael
  • 32,527
  • 49
  • 210
  • 370
0
votes
1 answer

How can I construct a class when the super class uses @Inject?

I have the following code: public abstract class AbstractClass { final A a; @Inject AbstractClass(A a) { this.a = a; } } public class B extends AbstractClass { final D d; @Inject B(D d) { super(); // this fails …
Michael
  • 32,527
  • 49
  • 210
  • 370