Re: Re: [Wicket-user] My take on Spring integration

2005-11-17 Thread Igor Vaynberg
done. -Igor On 11/17/05, Christian Essl <[EMAIL PROTECTED]> wrote: 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

Re: Re: [Wicket-user] My take on Spring integration

2005-11-17 Thread Christian Essl
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

Re: Re: [Wicket-user] My take on Spring integration

2005-11-16 Thread Igor Vaynberg
I think the web-access is also not uptodate http://cvs.sourceforge.net/viewcvs.py/wicket-stuff/wicket-contrib-spring/ 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. I was just

Re: Re: [Wicket-user] My take on Spring integration

2005-11-16 Thread Christian Essl
On Wed, 16 Nov 2005 08:32:06 -0800, Igor Vaynberg <[EMAIL PROTECTED]> wrote: yes it should all still be in the cvs in the same project. there are a few more packages in that project, wicket.contrib.proxy and wicket.contrib.injection. Johan said he was having weird issues with cvs also, not sur

Re: Re: [Wicket-user] My take on Spring integration

2005-11-16 Thread Igor Vaynberg
yes it should all still be in the cvs in the same project. there are a few more packages in that project, wicket.contrib.proxy and wicket.contrib.injection. Johan said he was having weird issues with cvs also, not sure what i can do about that. Im not sure about the injector being created as a spr

Re: Re: [Wicket-user] My take on Spring integration

2005-11-16 Thread Christian Essl
Sorry for my late replay and thanks for fixing all you did. Unfortunately I can still not find the code which does not forward finalize and has the IFieldValueFactory. Is it still in wicket-contrib-spring - is it tagged? Do you mind if i put your stuff into the main project? Not sure how to ma

Re: Re: [Wicket-user] My take on Spring integration

2005-11-12 Thread Igor Vaynberg
fixed the serialization problem. it was just too tired last night to see it. -Igor On 11/12/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: ok, lots more refactoring in. lazy init proxies now intercept hashcode,equals,tostring,finalize. i tried implementing writereplace and readresolve but it doesn

Re: Re: [Wicket-user] My take on Spring integration

2005-11-12 Thread Igor Vaynberg
Looking at your code makes me want to think we can use some abstract classes. The fact that you extended SpringInjector instead of ProxyInjector ... i will need to come up with something for that... Do you mind if i put your stuff into the main project? Not sure how to manage this stuff best...plu

Re: Re: [Wicket-user] My take on Spring integration

2005-11-12 Thread Igor Vaynberg
fixed the serialization problem. it was just too tired last night to see it. -Igor On 11/12/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: ok, lots more refactoring in. lazy init proxies now intercept hashcode,equals,tostring,finalize. i tried implementing writereplace and readresolve but it doesn

Re: Re: [Wicket-user] My take on Spring integration

2005-11-12 Thread Christian Essl
Thanks a lot for doing this. Unfortunately I can still not check out the changes. When I can I'll take a look at the LazyInitProxyFactory. Christian On Sat, 12 Nov 2005 01:12:21 -0800, Igor Vaynberg <[EMAIL PROTECTED]> wrote: ok, lots more refactoring in. lazy init proxies now intercept ha

Re: Re: [Wicket-user] My take on Spring integration

2005-11-12 Thread Igor Vaynberg
ok, lots more refactoring in. lazy init proxies now intercept hashcode,equals,tostring,finalize. i tried implementing writereplace and readresolve but it doesnt seem to be working, getting another weird class cast exception. writereplace works fine, and the object it generates deserializes into a

Re: Re: [Wicket-user] My take on Spring integration

2005-11-11 Thread Christian Essl
On Fri, 11 Nov 2005 14:51:16 -0800, Igor Vaynberg <[EMAIL PROTECTED]> wrote: i was actually thinking of creating a CompoundObjectLocatorFactory which would try its children until one returns a non-null. will try to get to that tonight as well :) That's better than my suggestion - Thank you

Re: Re: [Wicket-user] My take on Spring integration

2005-11-11 Thread Igor Vaynberg
i was actually thinking of creating a CompoundObjectLocatorFactory which would try its children until one returns a non-null. will try to get to that tonight as well :) -Igor On 11/11/05, Christian Essl <[EMAIL PROTECTED]> wrote: Igor made it quite easy to add your own way to inject things (not j

Re: Re: [Wicket-user] My take on Spring integration

2005-11-11 Thread Christian Essl
Igor made it quite easy to add your own way to inject things (not just SpringBeans). You just implement your own IObjectLocatorFactory and extend the SpringInjector to use this one. Enclosed is some code which uses jakarta commons-attributes to do the same thing as JDK1.5 annotations does with

Re: Re: [Wicket-user] My take on Spring integration

2005-11-11 Thread Igor Vaynberg
yeah, you are right. i will try to add that stuff in tonight. -Igor On 11/11/05, Christian Essl <[EMAIL PROTECTED]> wrote: The code realy looks good.Concerning the Proxy. For the cglib proxy you should definately notforward the call to finalize(), because when the proxy gets GC it willcall finaliz

Re: Re: [Wicket-user] My take on Spring integration

2005-11-11 Thread Igor Vaynberg
unlike annotations javadocs are not present at runtime, so i dont see a way to extract that metadata without some code generation step. a simple approach for 1.4 would be to "autowire" the dependencies. 1) try to find a bean with name==field.name and type==field.type 2) if 1 fails try to lookup be

Re: Re: [Wicket-user] My take on Spring integration

2005-11-11 Thread Ryan Sonnek
I would be very interested in a 1.4 port of this. Do you think it could use the same annotation based approach, but using Qdox to process instead of the built in 1.5 annotation functionality? On 11/11/05, Christian Essl <[EMAIL PROTECTED]> wrote: > The code realy looks good. > > Concerning the Pr

Re: Re: [Wicket-user] My take on Spring integration

2005-11-11 Thread Christian Essl
The code realy looks good. Concerning the Proxy. For the cglib proxy you should definately not forward the call to finalize(), because when the proxy gets GC it will call finalize() on the target and that is not what you want. I think same reasons apply for the other Object methods except equa

Re: Re: [Wicket-user] My take on Spring integration

2005-11-11 Thread Igor Vaynberg
more refactoring/tests and some new things: SpringWebApplicationFactory - which will pull the webapplication subclass out of spring application context SpringInjector/SpringWebApplica tion - make it very simple to inject objects using @SpringBean annotation with lazy-init proxies SpringWebPa

Re: [Wicket-user] My take on Spring integration

2005-11-09 Thread Alexandru Popescu
#: Christian Essl changed the world a bit at a time by saying on 11/10/2005 12:29 AM :# It is in wicket-stuff under wicket-contrib-spring. And there in the wicket.contrib.spring.injection package. Christian Thanks a lot Christian. ./alex -- .w( the_mindstorm )p. On Thu, 10 Nov 2005 00:0

Re: Re: [Wicket-user] My take on Spring integration

2005-11-09 Thread Christian Essl
It is in wicket-stuff under wicket-contrib-spring. And there in the wicket.contrib.spring.injection package. Christian On Thu, 10 Nov 2005 00:07:44 +0200, Alexandru Popescu <[EMAIL PROTECTED]> wrote: Looks like I've missed the part of where is this work available. Is it a way to access i

Re: AW: Re: [Wicket-user] My take on Spring integration

2005-11-09 Thread Alexandru Popescu
Looks like I've missed the part of where is this work available. Is it a way to access it? ./alex -- .w( the_mindstorm )p. --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it fo

Re: Re: [Wicket-user] My take on Spring integration

2005-11-09 Thread Christian Essl
Unfortunately the public cvs is late so I can't see your changes yet. Anyway before I've read this mail I started on reworking the proxing code (attached). SerializableLazyProxyCreator is the only thing with content the others are interfaces and one (basic) test. There are quite some changes:

Re: Re: [Wicket-user] My take on Spring integration

2005-11-09 Thread Igor Vaynberg
round 1 of refactoring is in. its much more elegant now. feedback please. -Igor On 11/8/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: thats pretty much exactly what i was thinking. -Igor On 11/8/05, Christian Essl <[EMAIL PROTECTED] > wrote: Very good. I am still playing around with the writeReplac

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Igor Vaynberg
thats pretty much exactly what i was thinking. -Igor On 11/8/05, Christian Essl <[EMAIL PROTECTED]> wrote: Very good. I am still playing around with the writeReplace thing.Regarding the refactoring what do you thing about this:Instead of the ISpringContextLocator have ainterface ObjectResolverFacto

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Christian Essl
Very good. I am still playing around with the writeReplace thing. Regarding the refactoring what do you thing about this: Instead of the ISpringContextLocator have a interface ObjectResolverFactory{ ObjectResolver getObjectResolver(Field field); } interface ObjectResolver{ Object resolve();

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Igor Vaynberg
ok, got the pure cglib solution working. just had to call enhancer.setInterfaces(new Class[] { Serializable.class}) to weave in the serializable interface. now it appears everything is working. sweet. i am going to do a lot of refactoring today. maybe you can make your wrappingcontext use the same

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Igor Vaynberg
I would rather weave it in using cglib and stay away from a spring-specific proxy impl, becuase this thing can easily be generalized to things beyound spring, like jndi lookups, etc. -Igor On 11/8/05, Christian Essl <[EMAIL PROTECTED]> wrote: On Tue, 8 Nov 2005 11:59:22 -0800, Igor Vaynberg <[EMAI

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Christian Essl
On Tue, 8 Nov 2005 11:59:22 -0800, Igor Vaynberg <[EMAIL PROTECTED]> wrote: Im still getting a class cast exception using cglib directly. im probably doing something dumb, you want to take a look? SpringInitializer line 61 is commented out, thats where proxies are created for concrete objects

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Igor Vaynberg
Im still getting a class cast exception using cglib directly. im probably doing something dumb, you want to take a look? SpringInitializer line 61 is commented out, thats where proxies are created for concrete objects. By the way, the spring one works fine IF the dependency implements Serializable

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Christian Essl
I do not know wheter read/writeObject is called on objects referenced from session attributes ("full serialization closure"). However the spec does not speak about writeReplace() and readResolve() so 'legaly' you should be on the right side if you rely on these. Enclosed is some code which I g

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Christian Essl
It is more for components: //constructor public OrderPage(){ add(new CustomerPanel("customer",getWrappingContext().getBean("customerDAO",CustomerDAO.class)); } Just for normal DI in code. Christian On Tue, 8 Nov 2005 08:31:47 -0800, Igor Vaynberg <[EMAIL PROTECTED]> wrote: What I'm work

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Igor Vaynberg
What I'm working on now is an ApplicationContext which wrapps the 'real'ApplicationContext and does create for getBean() etc automatically the proxies. I think this way I'll never have to worry about the serializationproblem for such beans. but what will inject your pages? -Igor

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Igor Vaynberg
there are too many gotchas like this with doing it from the inside. i would make the page constructors protected and create simple static factory methods that create the page and then do the injection. -Igor On 11/8/05, Christian Essl <[EMAIL PROTECTED]> wrote: Yes you are right!I was now more thi

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Christian Essl
Yes you are right! I was now more thinking of Igors proposal todo the 'injection' from the outside: MyComponent comp = new MyComponent("id"); //set this and that SpringInitializer.initialize(comp,locator); If you'd do it from the inside (as the original code) it is a different story. I don

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Johan Compagner
Just of my head two further suggestions:1.) If a field is not null than do not inject anything. This way custom injections could be done Fields are always null because they are not initialized yet by the sub class (when having a super class that does the injections)  

Re: Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Christian Essl
Wow great job Igor. Thanks for doing it. I think that's the proper way to go. Regarding cglib I think you should use spring AOP (it is already a dependency and generalization can wait a bit). Spring AOP handles all that and a bit more and is easy to use. Ie for cglib like in the current imple

Re: [Wicket-user] My take on Spring integration

2005-11-08 Thread Alexandru Popescu
Somewhere in this thread I think I have identified a suggestion that looked very much in the direction I would like to see it going. Unfortunately, right now I will need to pass through the thread again and identify it. Probably the way I would go would be to define an annotation @SpringBean(la

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Christian Essl
I think there should be both of your implementations. IMO the constructor based impl should have the protected doInject method, because to me it seems to be the easiest way to inject manually services in the constructor without the need to manually proxy them. Yes with cglib we'll hit the fin

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Christian Essl
That's right. That's propably the cleanest way and you can use it on each component. The problem why I came up with the constructor aproach initially was that generally all the subcomponents are created and setup in the constructor. And it would than be IMO more wicket like if you can also inj

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
mensagem original ---  De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net  Cc:Data: Mon, 7 Nov 2005 13:56:39 -0200 Assunto: Re: Re: [Wicket-user] My take on Spring integration > PS.: Someone responded this thread in a way that gmail (only gmail?)> could not find

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Gustavo Hexsel
l changes to object interfaces have to be done by hand. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Mon, 7 Nov 2005 13:56:39 -0200 Assunto: Re: Re: [Wicket-user] My take on Spri

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Christian Essl
Unfortunately I think this does not work. Actually cglib creates at runtime a subclass where you can override methods and as with any java code you can not override final (or private) methods. So when a non overridable method is called on the proxy it is not possible to delegate it and any sta

Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
On 11/7/05, Sven Meier <[EMAIL PROTECTED]> wrote: Hello Igor,I must object to your statement that my proposed page factory is not IoC:Nobody says that a Spring context is the only valid container in anapplication. The page factory just becomes part of the this logical container, it is aware of and

Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Eelco Hillenius
That kind of hooks exist. One of our goals for 1.2 is to further formalize this, and also have better pluggable support for url handling and state handling. We are getting some ideas on how this could look, but it is stuff you really have to think through well. Eelco On 11/7/05, Sven Meier <[EMA

Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Sven Meier
Hello Igor, I must object to your statement that my proposed page factory is not IoC: Nobody says that a Spring context is the only valid container in an application. The page factory just becomes part of the this logical container, it is aware of and cooperates with the Sprint context. When

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
yes. but instead of doing the injection right away the proxy would do injection-on-first-access. that way you get lazy injection and strongly typed pages. so you would annotate getter functions with the @SpringBean annot, and the proxy would first call the getter ... if the getter returns null the

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Christian Essl
Do you mean when you construct the page you do something like MyPage page = (MyPage) wrapInProxy(new MyPage(..)); and wrapInProxy does create the Proxy and does all the injection? On Mon, 7 Nov 2005 11:56:23 -0800, Igor Vaynberg <[EMAIL PROTECTED]> wrote: yeah, i was thinking cglib and ext

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
yeah, i was thinking cglib and extract at runtime never used cglib before though that way you just wrap the page with the proxy after you create it and there is no need to worry about serialization/deserialiation garbage -Igor On 11/7/05, Christian Essl <[EMAIL PROTECTED]> wrote: The interface of

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Christian Essl
The interface of the setter parameter or of the field type. Of course a restriction. If you want more you could use cglib (or spring aop). Don't know. On Mon, 7 Nov 2005 11:27:28 -0800, Igor Vaynberg <[EMAIL PROTECTED]> wrote: what interface would you use for the proxy though? -Igor On

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
what interface would you use for the proxy though? -Igor On 11/7/05, Christian Essl <[EMAIL PROTECTED]> wrote: Thanks for the clarification and sorry for the confusion. So readObject()as you have it in your code is fine.> To get the bean context i simply make my applicationbean implement> applicati

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Christian Essl
Thanks for the clarification and sorry for the confusion. So readObject() as you have it in your code is fine. To get the bean context i simply make my applicationbean implement applicationcontextaware and then i use ((MyApplication)Application.get()).getBeanContext() static lookup which works

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
I think with xml sereialization getobject is never called so there we still have a problem. But i think when the pagemap will deserialize the page if normal serialization is used then the readobject will be called on the page. The serialization closure, i think, reffers to the fact that container

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Christian Essl
On Mon, 7 Nov 2005 15:25:29 +0100, Johan Compagner <[EMAIL PROTECTED]> wrote: And there is also a thing like XML Serialization Which also doesn't use the java read/write object at all. Does this mean that the readObject is guaranteed to be called on Page because it is serialized through the

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
Yes, it is not ioc, i never claimed it was. Sven's page factory is not ioc either because the container does not manage the lifecycle of the page. Does an ioc page make sense? I dont think so. I like to use the new operator to instantiate pages myself, I also really like to have strongly typed con

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Eduardo Rocha
PS.: Someone responded this thread in a way that gmail (only gmail?) could not find it associated with previous messages, I hope people continue to discuss and keep this, and not open a new thread with (AW: Re: Re: My take on Spring integration). Igor, the class you have implemented is exactly the

Re: Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Johan Compagner
Those method names are really wrong. Because those are not called when a request begins they are called when the response begins so it should be called onBeginRespond()/onEndRespond() onBeginRequest() should also be there but that one should be called right after the page is reconstructed from the

Re: Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Juergen Donnerstag
Maybe RequestCycle.onBegin/EndRequest is what you are looking for? Juergen On 11/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Igor, > > >here is something i threw together that solves the deserialization > >>andability to use the new operator to create pages. > > thanks for your work

AW: Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread sven
Hi Igor, >here is something i threw together that solves the deserialization >andability >to use the new operator to create pages. thanks for your work on this. Regretfully it's still a solution I wouldn't like to use: IMHO dependency injection should not be done by the object which has the d

AW: Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread sven
>and you have to have the pages defined as beans in the application >context? >with their properties specified? Yes, I configure most wicket stuff in a separate context, which is bootstrapped by a custom application factory: >but how does the above handle deserealization of pages? >

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Johan Compagner
And there is also a thing like XML Serialization Which also doesn't use the java read/write object at all. On 11/7/05, Christian Essl <[EMAIL PROTECTED]> wrote: Hi Igor,I looked through your code. Thanks for implementing it. I am not surewheter readObject() is the right place to do the (re)injectio

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Christian Essl
Hi Igor, I looked through your code. Thanks for implementing it. I am not sure wheter readObject() is the right place to do the (re)injection. According to the servlet-spec in SVR 7.7.2 readObject() is not guaranteed to be called on session-attributes. (Instead session attributes which implem

Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Eduardo Rocha
2005/11/6, Eelco Hillenius <[EMAIL PROTECTED]>: > I see absolutely nothing wrong with lookups at that level. It's less > code than you would need for any component configuration and it's more > efficient too. And there are just no disadvantages, are there? > The Application class have references t

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
here is something i threw together that solves the deserialization and ability to use the new operator to create pages. atleast i think it doesits really late here and all i really know so far is that it compiles :) the idea is pretty simple, do the injection in the default constructor, and th

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
and you have to have the pages defined as beans in the application context? with their properties specified? -Igor On 11/7/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: but how does the above handle deserealization of pages? there is nothing to reinject the dependencies. -Igor On 11/7/05, [EMAIL P

Re: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread Igor Vaynberg
but how does the above handle deserealization of pages? there is nothing to reinject the dependencies. -Igor On 11/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: IMHO pages are standing on the borderline between a stateful GUI and the rest of the application in form of stateless services.DI sh

AW: Re: [Wicket-user] My take on Spring integration

2005-11-07 Thread sven
IMHO pages are standing on the borderline between a stateful GUI and the rest of the application in form of stateless services. DI should be done by the IoC container, creating the pages can better be done the standard Wicket way (e.g. with PageParameters). As described before I'm using a custo

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Alexandru Popescu
#: Eelco Hillenius changed the world a bit at a time by saying on 11/6/2005 9:38 PM :# I see absolutely nothing wrong with lookups at that level. It's less code than you would need for any component configuration and it's more efficient too. And there are just no disadvantages, are there? And.

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Eelco Hillenius
I see absolutely nothing wrong with lookups at that level. It's less code than you would need for any component configuration and it's more efficient too. And there are just no disadvantages, are there? And... for this whole discussion: if you like one approach... go implement it now! Create your

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Igor Vaynberg
you are right, this is not ioc. but are pages/components managed by an ioc container? -Igor On 11/6/05, Alexandru Popescu <[EMAIL PROTECTED]> wrote: #: Igor Vaynberg changed the world a bit at a time by saying on  11/6/2005 7:06 PM :#> Or how about a simple solution:>> public MyApplication extends

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Alexandru Popescu
#: Igor Vaynberg changed the world a bit at a time by saying on 11/6/2005 7:06 PM :# Or how about a simple solution: public MyApplication extends WebApplication { public Object lookup(String name) { Object=...do a lookup from somewhere like spring context or app object...; return object; } }

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Igor Vaynberg
Or how about a simple solution: public MyApplication extends WebApplication {   public Object lookup(String name) { Object=...do a lookup from somewhere like spring context or app object...; return object;    } } public MyPage extends Page {     public transient SomeService service;   

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Eduardo Rocha
2005/11/6, Alexandru Popescu <[EMAIL PROTECTED]>: > #: Eduardo Rocha changed the world a bit at a time by saying on 11/6/2005 > 3:51 PM :# > > I think Christian's idea is nice, and I saw at least three comments against > > it: > > > > 1. It is necessary to call injectDependencies on deserializat

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Alexandru Popescu
#: Eduardo Rocha changed the world a bit at a time by saying on 11/6/2005 3:51 PM :# I think Christian's idea is nice, and I saw at least three comments against it: 1. It is necessary to call injectDependencies on deserialization (Igor) If a component implements "protected Object readResolve(

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Eduardo Rocha
"Make it final?" I personally dislike Wicket's final methods, but I would like to read people's opinion :) - and in this case it is the easiest way. 2005/11/6, Eduardo Rocha <[EMAIL PROTECTED]>: > I think Christian's idea is nice, and I saw at least three comments against > it: > > 1. It is nece

Re: [Wicket-user] My take on Spring integration

2005-11-06 Thread Eduardo Rocha
I think Christian's idea is nice, and I saw at least three comments against it: 1. It is necessary to call injectDependencies on deserialization (Igor) If a component implements "protected Object readResolve() throws ObjectStreamException", as specified in Serializable class, I think this could b

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Christian Essl
On Thu, 27 Oct 2005 16:15:37 -0700, Eelco Hillenius <[EMAIL PROTECTED]> wrote: Furthermore, you should never ever call a overridable method in a constructor. You are right. It must be commented to not be dependent on any state set of the constructors below this magic helper class. Apart of t

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Christian Essl
[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 injectDependencie

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Eelco Hillenius
Furthermore, you should never ever call a overridable method in a constructor. Eelco On 10/27/05, Alexandru Popescu <[EMAIL PROTECTED]> wrote: > #: Christian Essl changed the world a bit at a time by saying on 10/28/2005 > 12:54 AM :# > > Is AOP realy needed for that? > > > > Propably I do not

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Alexandru Popescu
#: Christian Essl changed the world a bit at a time by saying on 10/28/2005 12:54 AM :# 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. Th

RE: [Wicket-user] My take on Spring integration

2005-10-27 Thread Igor Vaynberg
7, 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 >

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Christian Essl
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

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Stefan Arentz
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

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Stefan Arentz
On Oct 27, 2005, at 11:00 AM, Joni Suominen wrote: On Wed, 2005-10-26 at 10:59 -0700, Igor Vaynberg wrote: This is similar to how i do it. My application is a spring bean that gets injected by spring on creation and is then used as a service locator. I am simply questioning the automatic inje

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Stefan Arentz
On Oct 27, 2005, at 12:26 PM, Alexandru Popescu wrote: #: Joni Suominen changed the world a bit at a time by saying on 10/27/2005 11:00 AM :# On Wed, 2005-10-26 at 10:59 -0700, Igor Vaynberg wrote: This is similar to how i do it. My application is a spring bean that gets injected by spri

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Sven Meier
>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

RE: [Wicket-user] My take on Spring integration

2005-10-27 Thread Igor Vaynberg
[EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Joni Suominen > Sent: Thursday, October 27, 2005 2:01 AM > To: wicket-user@lists.sourceforge.net > Subject: RE: [Wicket-user] My take on Spring integration > > On Wed, 2005-10-26 at 10:59 -0700, Igor Vaynberg wrote: >

Re: [Wicket-user] My take on Spring integration

2005-10-27 Thread Alexandru Popescu
#: Joni Suominen changed the world a bit at a time by saying on 10/27/2005 11:00 AM :# On Wed, 2005-10-26 at 10:59 -0700, Igor Vaynberg wrote: This is similar to how i do it. My application is a spring bean that gets injected by spring on creation and is then used as a service locator. I am si

RE: [Wicket-user] My take on Spring integration

2005-10-27 Thread Joni Suominen
On Wed, 2005-10-26 at 10:59 -0700, Igor Vaynberg wrote: > This is similar to how i do it. My application is a spring bean that > gets injected by spring on creation and is then used as a service > locator. I am simply questioning the automatic injection into pages, > does it really make sense if it

RE: [Wicket-user] My take on Spring integration

2005-10-26 Thread Igor Vaynberg
> * Components should be generic and not directly tied to a > specific application. So instead of the static configuration > using annotations the component should have > dynamic/programmatic configuration from within the page that uses it. I create plenty of application specific components, es

Re: [Wicket-user] My take on Spring integration

2005-10-26 Thread Stefan Arentz
On Oct 26, 2005, at 7:49 PM, Igor Vaynberg wrote: So where does the automatic injection stop? What if I have a panel that needs a reference to a service? Or a subclass of a component? Good question. I think I'm going with this: * Pages are application specific and thus can have references

RE: [Wicket-user] My take on Spring integration

2005-10-26 Thread Igor Vaynberg
: [Wicket-user] My take on Spring integration My Application class has access to the bean factory.  If a Panel or a Link needs something, I just get it from there.  This might not be the best way to do it within Wicket, but ignorance is bliss.  On 10/26/05, Igor Vaynberg <[EM

Re: [Wicket-user] My take on Spring integration

2005-10-26 Thread Nick Heudecker
My Application class has access to the bean factory.  If a Panel or a Link needs something, I just get it from there.  This might not be the best way to do it within Wicket, but ignorance is bliss.  On 10/26/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: So where does the automatic injection stop? W

RE: [Wicket-user] My take on Spring integration

2005-10-26 Thread Igor Vaynberg
r 26, 2005 9:56 AM > To: wicket-user@lists.sourceforge.net > Subject: Re: [Wicket-user] My take on Spring integration > > > On Oct 26, 2005, at 10:54 AM, Johan Compagner wrote: > > > I am not a spring expert/user so i am a bit curious when is it all >

Re: [Wicket-user] My take on Spring integration

2005-10-26 Thread Stefan Arentz
On Oct 26, 2005, at 10:54 AM, Johan Compagner wrote: I am not a spring expert/user so i am a bit curious when is it all injected? for example if i do this: setResponsePage(new UserPage(user)); and that userpage has some spring beans that also must be instantiated? That works. I am doing

Re: [Wicket-user] My take on Spring integration

2005-10-26 Thread Ryan Sonnek
My take on spring integration is that it should only work if you use the web page factory. If you instantiate the pages directly using a custom constructor, you should be expected to pass in the needed service. This follows the Good Citizen Pattern (http://www.picocontainer.org/Good+Citizen) and

Re: [Wicket-user] My take on Spring integration

2005-10-26 Thread Joni Suominen
On Tue, 2005-10-25 at 18:41 +0200, Stefan Arentz wrote: > Better idea! Add some AOP and annotation magic to the mix! > > public class HelloWorldWebPage extends WebPage > { > @SpringBeanReference("dutchHelloWorldService") > private transient HelloWorldService helloWorldService; > >

Re: [Wicket-user] My take on Spring integration

2005-10-26 Thread Alexandru Popescu
#: Johan Compagner changed the world a bit at a time by saying on 10/26/2005 10:54 AM :# I am not a spring expert/user so i am a bit curious when is it all injected? for example if i do this: setResponsePage(new UserPage(user)); and that userpage has some spring beans that also must be instant

Re: [Wicket-user] My take on Spring integration

2005-10-26 Thread Johan Compagner
I am not a spring expert/user so i am a bit curious when is it all injected? for example if i do this: setResponsePage(new UserPage(user)); and that userpage has some spring beans that also must be instantiated? And then that userpage is serialized how do you inject those beans again? Did you ove

Re: [Wicket-user] My take on Spring integration

2005-10-25 Thread Alexandru Popescu
#: Stefan Arentz changed the world a bit at a time by saying on 10/26/2005 6:44 AM :# On Oct 26, 2005, at 12:39 AM, Alexandru Popescu wrote: #: Stefan Arentz changed the world a bit at a time by saying on 10/25/2005 9:58 PM :# On Oct 25, 2005, at 10:48 PM, Alexandru Popescu wrote: #: St

  1   2   >