I just finish used the option: -gen myGenClasses. My MyServiceFactoryGenerated looks fine.
Should I merge myGenClasses directory with war/WEB-INF/classes or something like that before deploy? ty On Wed, May 5, 2010 at 11:43 AM, Thomas Broyer <[email protected]> wrote: > > > On May 5, 12:50 am, Mike <[email protected]> wrote: > > Hi guys, > > > > I have the Generator bellow working perfectly on hosted mode inside > > eclipse but now I'm trying generate one .war to deploy on tomcat. The > > tomcat start normally without any error on log messages but my > > Generator does nothing. > > > > <generate-with > > class="br.com.mycompany.generator.PresenterFactoryGenerator"> > > <when-type-assignable > > class="br.com.mycompany.client.generator.PresenterService" /> > > </generate-with> > > > > public interface PresenterService { > > public Presenter newPresenter(Class class); > > > > } > > > > public class MyServiceFactory implements PresenterService { > > public Presenter newPresenter(Class class) { return null } > > > > } > > > > public class PresenterFactoryGenerator extends Generator { > > // at the end, creates a class to return dynamically any presenter > > that I want ; > > > > } > > > > PresenterService service = GWT.create(MyServiceFactory .class); > > MyPresenter presenter = service.newPresenter( someClazz ); > > > > My Presenter comes null on web mode. I took too long to realize this > > because works perfectly inside Eclipse. > > > > PS: I have gwt-servlet.jar on my lib directory. > > > > Any help? I'm really lost here. > > Passing the -gen argument (e.g. "-gen gen") to the Compiler will > output the generated files into the given directory ("gen" in my > example) so you can explore what your generator outputs and eventually > find out why it fails. > > Beware of using Class<?> on the client side though... IMO, you'd > better generate one method per specific class you need (public > SomeClass newSomeClassPresenter() { ... }) instead of relying on > Class<?>. > Compile in Pretty or Detailed style and look at the generated JS code. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- Mike Shigueru Matsumoto -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
