>Igor Vaynberg wrote:
>I am simply questioning the automatic injection into pages, does it really
>make sense if it only takes you half way there. If in my panel i need to do a
>((MyPage)getPage()).getService()
>  then i might as well do
>((MyApp)getApplication).getService().

IMHO this makes a great difference. In the first case you'll have
PageA
 getService1()
 getService2()
 getService3()
PageB
 getService4()
 getService5()
...

In the latter case you'll have
ApplicationX
 getService1()
 getService2()
 getService3()
 getService4()
 getService5()
 ...

If you'll do this in a large project, your application class will sooner or later turn into a sink of services.

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.

Just my two cents

Sven


-------------------------------------------------------
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