Friday, September 14, 2018

Deferred Binding - Help!

 Hi Everyone - I've been searching everywhere for a solution to this and haven't been able to resolve it. I don't think I've properly wrapped my head around the issue, so hoping someone could provide some guidance.

I am trying to build a modular GWT application - by that I mean that there will be the core application, but it should support the addition of gwt modules ("plugins") without having to rebuild. This is being accomplished by updating parameters in the web.xml so that I can just stop the webapp, add a .jar file to the /lib directory, define the new .jar in the web.xml and restart the application. So far so good. The problem arises when trying to initialize/access the classes within the plugins.

Let's imagine I had a PetStore application (classic example!). I have an interface called Pet that is implemented by some classic examples (Cat, Dog, Fish) in the core application. However, I want to be able to add a plugin for an exotic pet (Borneo Pygmy Elephant), and have the application (client-side) be able to load the class when a record comes up that refers to it. I am able to do this server-side using a URLClassLoader, but can't figure out how to use a Generator to instantiate all possible Pet implementations within a module.

If I am going to implement a generator, should it be in the plugin or in the core application? I've found a few examples, but none seem to pinpoint exactly what I'm trying to do. Appreciate any help...

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment