On Thu, 27 Oct 2005 15:56:03 -0700, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

You would also need to call injectDependencies when a page and components
are deserialized from session - the latter can be tricky.


You are right. Maybe construct on deserialization proxies which on first call trigger the injectDependencies() and than forward to the actually injected service.

Anyway IMO as long as the bean-name is specified in the using class it is lookup which you can turn off for testing - and is of course convinient. However some key-strokes more can do this as well.

getServiceXY(){
  return _xy == null ? somewhere.getService("xy") : _xy;
}

Christian


-Igor


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian Essl
Sent: Thursday, October 27, 2005 3:55 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] My take on Spring integration

Is AOP realy needed for that?

Propably I do not understand the problem but why can't you
just write a special Panel, Page etc which calls an
overrideable injectDependencies() method in the constructor.
The default implementation of
injectDependencies() does basicly read the annotations,
lookup the services and inject them? I think this way you
could on an instance by instance basis fine-grain control
what gets injected. And during testing you just inject the
mocks in this overriden method.

Just my two cents.

Thanks,
Christian

On Thu, 27 Oct 2005 21:50:02 +0200, Stefan Arentz
<[EMAIL PROTECTED]> wrote:

>
> On Oct 27, 2005, at 9:21 PM, Sven Meier wrote:
>>
>> BTW rather than letting panels pull service from the page, I'd
>> prefer the page to push services into its panels (i.e. the page
>> injects dependencies into its panels).
>> I don't want my panels to be dependent on the containing page.
>
> Yup. That is exactly what I do.
>
> But. I just moved the aspect from WebPage to Component and guess
> what, the annotation and bean resolving works fine in Panels and
> WebComponents too now :-)
>
> It is still to hackerish to use btw. There are some really nasty
> delays for example. I need to find some time to polish this.
>
>   S.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course Free
> Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more
information
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Christian Essl

        

        
                
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos -
Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Christian Essl
        

        
                
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to