Per Brandon, I have deployed version 3.1 of stripes-guice. I have also updated the documentation at http://bgoodin.github.com/stripes-guice/howto.html. Version 3.1 should be available on maven by tomorrow morning.
I added an extension package and a GuiceTypeConverterFactory. If you specify the extension directory it should add the support automagically. The important part to notice is the following little nugget to add to your Stripes filter config: <filter> <display-name>Stripes Filter</display-name> <filter-name>StripesFilter</filter-name> <filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class> ... <init-param> <param-name>Extension.Packages</param-name> <param-value>com.silvermindsoftware.sg.extension</param-value> </init-param> ... </filter> After you add that you should be able to simply annotate your TypeConverter with an @Inject on the constructor and have it work. Brandon On Mon, Mar 4, 2013 at 10:51 AM, Dan Kaplan <d...@mirthcorp.com> wrote: > OK, thanks for the info. Any workarounds? Here's what I did: > > public DeployTypeConverter() { > deployDao = new > CustomInjectorFactory().getInjector(null).getInstance(DeployDao.class); > //Stripes limitation: Guice doesn't manage the TypeConverters so I need to > manually inject code > } > > That CustomInjectorFactory is described in on the Guice-stripes page. > Here's my implementation of it: > > public class CustomInjectorFactory implements GuiceInjectorFactory { > > /** > * I've made this static so that every class that refers to this > directly gets the same injector instance. > * Without this, I'd be worried that there could be two @Singletons in > existence > */ > private final static Injector injector = Guice.createInjector(new > DeployManagerModule()); > > @Override > public Injector getInjector(ServletContext servletContext) { > return injector; > } > } > > > On Sun, Mar 3, 2013 at 7:10 PM, Nathan Maves <nathan.ma...@gmail.com> wrote: >> >> This is a know limitation of the current framework. >> >> Nathan >> >> On Mon, Feb 25, 2013 at 10:30 AM, Dan Kaplan <d...@mirthcorp.com> wrote: >> > I'm using this library: >> > http://bgoodin.github.com/stripes-guice/howto.html >> > >> > I've set it up somewhat correctly because my action beans seem to be >> > injected with my DAOs. But I have a TypeConverter and I tried to >> > @Inject >> > it and it gets a null pointer exception when it uses the DAO. Is this a >> > known limitation? >> > >> > -- >> > Thanks, >> > Dan >> > >> > CONFIDENTIALITY NOTICE: The information contained in this electronic >> > transmission may be confidential. If you are not an intended recipient, >> > be >> > aware that any disclosure, copying, distribution or use of the >> > information >> > contained in this transmission is prohibited and may be unlawful. If you >> > have received this transmission in error, please notify us by email >> > reply >> > and then erase it from your computer system. >> > >> > ------------------------------------------------------------------------------ >> > Everyone hates slow websites. So do we. >> > Make your web apps faster with AppDynamics >> > Download AppDynamics Lite for free today: >> > http://p.sf.net/sfu/appdyn_d2d_feb >> > _______________________________________________ >> > Stripes-users mailing list >> > Stripes-users@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/stripes-users >> > >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_feb >> _______________________________________________ >> Stripes-users mailing list >> Stripes-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/stripes-users > > > > > -- > Thanks, > Dan > > CONFIDENTIALITY NOTICE: The information contained in this electronic > transmission may be confidential. If you are not an intended recipient, be > aware that any disclosure, copying, distribution or use of the information > contained in this transmission is prohibited and may be unlawful. If you > have received this transmission in error, please notify us by email reply > and then erase it from your computer system. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users