Thank you very much Martin :)

On 01/03/2010 09:00, Martin Grigorov wrote:
Just created a ticket and attached a patch

https://issues.apache.org/jira/browse/WICKET-2761


On Sun, 2010-02-28 at 21:29 -0300, Mauro Ciancio wrote:
José María,
   For example, sometimes I need an injected object in a DataProvider, but
this is constructed in the context of a page. So, I can easily pass the injected
object into the page to the DataProvider.

Code:
public page extends page {

   @inject
   myservice

   page() {
     new provider(myservice);
   }
}

   Is this your case?

PS: I think you would have understood me better if I wrote to you in spanish :)

Cheers.

2010/2/28 José María Ruiz<josema...@simpleoption.com>:
Hi, I'm trying to inject an object that it's not a Component. I've found
that, with Spring, is as simple as using:

InjectorHolder.getInjector().inject(this);

But there aren't anything similar for Guice, the nearest thing looks to be:

((GuiceInjectorHolder) ((MyApplication)
MyApplication.get()).getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector().injectMembers(this);

as said in:

http://old.nabble.com/Problem-with-Wicket-and-Guice-td14787021.html

Is there a simpler way? If not, are there plans to introduce something
similar in Wicket-Guice?

Best regards.
--
José María Ruiz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





--
José María Ruiz Aguilera
Simple Option S.L.U.
Telf/Fax:+34 951930122


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to