Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DMI lookupstyle

    Reading the quickstart guide, I saw:

    DMI:
    "Other options for lookupStyle allow you to:obtain objects via the Spring framework, including the ability to use Spring’s “dependency injection” to set up the target object"

    I am actually using Guice in the server, and want to use it in a DMI Object.

    Specifically, I have two classes: A and B. A is my DMI Class that I point to in a fetch operation in the ds.xml. Class A wants an instance of class B using Guice. So:

    class A {
    @Inject
    A(B b) { }
    }

    If I understand the quickstart correctly, it was possible if I used Spring,.. but what about Guice? What should I do in order to be able to use Guice with my DMI Objects?

    Using smartgwt 4.1p Power.

    #2
    Could you be more specific about how you expect to use Guice in this context.

    As far as the Spring integration, the only thing you are providing to the framework is the Spring bean name. You could use dependency injection - whether via Guice or another mechanism - to cause the bean that is actually returned to the framework to be different depending on the environment being used.

    Comment

    Working...
    X