UserService must be a Tapestry service in a Tapestry-controlled package for @Inject to work It probably isn't.
On Oct 28, 2012, at 4:22 PM, membersound <memberso...@web.de> wrote: > I created a DAO and inject it into my UserService. But whenever I access my > UserService, the dao is always null! Can someone spot what I might be doing > wrong? > > > interface CrudServiceDAO{} > > class HibernateCrudServiceDAO implements CrudServiceDAO { > @Inject > Session session; > } > > > class AppModule { > public static void bind(ServiceBinder binder) > { > binder.bind(CrudServiceDAO.class, HibernateCrudServiceDAO.class); > } > } > > > class UserService { > @Inject > private CrudServiceDAO dao; > > List<User> getUsers() { > //dao is always NULL!! > return dao.findAll(); > } > } > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/DAO-is-always-null-tp5717355.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org