If you are using _only_ spring and no wicket you _still_ can't do the "new ClsDb()" method and have the @Autowired fields populated. You're question isn't really specific to wicket anymore in that situation.
On Fri, Sep 27, 2013 at 12:32 PM, dan123 [via Apache Wicket] < [email protected]> wrote: > Thanks to everybody for help. > > Paul Bors wrote > As far as I can tell you the Spring native annotations work within the > implementation of a bean you already injected in your wicket component. > First crate a service for yourself and inject it where needed in Wicket > via > @SpringBean. Then inside your service feel free to inject other Spring > dependencies via Spring's native annotations. > > > It works. > But I thought, that I can set something (something like a scanning all > classes) in web.xml or springContext.xml file to scan for all @Autowired > annotations and it will be autowired in all classes. So why I have to use > "@SpringBean ClsDb clsDb;" in my HomePage.class and then I can use > @Autowired in CldDb class. Why I cannon use only "new ClsDb();"? There is > no way how to autowired all beans? > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://apache-wicket.1842946.n4.nabble.com/wicket-autowired-annotation-tp4661529p4661583.html > To unsubscribe from wicket + autowired annotation, click > here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4661529&code=bWlndWVsQHRoZWRlYW5kYS5jb218NDY2MTUyOXwxNjAzMjU4NTI=> > . > NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-autowired-annotation-tp4661529p4661586.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
