On Wed, 16 Nov 2005 23:50:11 -0800, Igor Vaynberg
<[EMAIL PROTECTED]> wrote:
http://cvs.sourceforge.net/viewcvs.py/wicket-stuff/wicket-contrib-spring/src/java/wicket/contrib/
here i can see the proxy/injection/spring packages, so its up to date.
Thanks now I can also check it out.
One final thing: The JDKHandler should catch on method.invoke() the
InvocationTargetException and throw the wrapped exception. Otherwise when
the code which uses the proxy trys to catch an Exception thrown by the
underlying object it will never get it (only an
UndeclaredThrowableException). See the javadoc of
InvocationHandler.invoke() Throws.
Christian
I was just thinking of an easy way to configure the static instance
gotten
from SpringInjector.getInstance(). So I thought that
SpringInjector.getInstance() would call
ApplicationContext.getBean("SpringInjector",SpringInjector.class) and if
there is none return the singelton instance.
but then you have to make the bean name configurable, what if someone has
two injectors or wants a different name. it will never end. creating a
custom one is trivial because the base class is very simple. a few lines
of
code later you can have one that works great for you.
An alternative could be that there is a generic injector which loads a
list of IFieldValueFactories from the WebApplication.
once again, i think this is better done in a custom way. its very easy to
have something like this:
class InjectorLocator { public static Injector getInjector() { // create
and
return injector here } }
then instead of using springwebpage create your own that uses the static
lookup from injectorlocator to get the injector as opposed to using the
default springinjector. this can even allow you to do unit testing on
your
pages, just have some flag in getInjector() that returns a noop
implementation.
-Igor
--
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. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user