I find this kind of Spring integration quite limited. Is there any way
to utilize IOC in Wicket components? I would like to see something like
this:
public class MyComponent extends Component {
private transient MyDao myDao;
public MyComponent(String id) {
super(id);
add(...)
...
}
public void setMyDao(MyDao myDao) {
this.myDao = myDao;
}
}
This dependency could be injected using various injection strategies
(xml, autowire etc.) when using Spring. Can Spring be integrated with
Wicket using IOC instead of lookups?
--
Joni Suominen
On Fri, 2005-08-19 at 14:33 +0200, Koen Serry wrote:
> Hi
>
> I did before posting to this mailing list, but as I found the
> construct a bit weird to me I was thinking if an alternative would be
> possible.
>
> Like the SpringApplicationController creates a new instance of the
> servlet to then assign the application to it, or the
> SpringContextLocator is implemented as a singleton/factory requiring
> the page to pass the request to it.
>
> I was just wondering if this could be a plausable alternative since it
> seems like a lot of overhead just to get to the applicationContext.
>
> Koen
>
> Juergen Donnerstag wrote:
> > please have a look at sourceforge project wicket-stuff which contains
> > additional higher level component. It contains also a modul with
> > different alternatives on how to integrate with Spring. I think there
> > is even a example application in there.
> >
> > Juergen
> >
> > On 8/19/05, Koen Serry <[EMAIL PROTECTED]> wrote:
> >
> > > Hi all,
> > >
> > > I've been looking into Wicket for a couple of days now and I have to say
> > > I like what I see so far from a web framework point of view.
> > > However I have a couple remarks/questions with regards to Spring
> > > integration or IOC integration in general for that matter.
> > >
> > > So far I've been using tapestry and in tapestry 3 it was pretty easy,
> > > you subclassed the engine class, put the applicationContext in it, and
> > > from whatever page-class you could access it. In Tapestry 4 however,
> > > they haven't found a clean way so that's one of the reasons I was moving
> > > to Wicket.
> > >
> > > Now would it be possible to keep some kind of global(Map) in Wicket as a
> > > way of putting/getting 'other' items in the Application?
> > > Since you're pretty much required to subclass the Application class and
> > > it gets initialized with the WicketServlet pretty much immediately. This
> > > would allow the ApplicationContext of spring or some frequently used
> > > items like a sessionFactory of Hibernate (if you didn't want to use
> > > Spring) to be easely accessed from each page to be used. As then the
> > > only thing it would require is like getApplication().get("spring") or if
> > > you'd use ognl getApplication().get("spring.mydao").
> > >
> > > What do you guys think?
> > >
> > > Koen Serry
> > > http://www.serry.org
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > > Practices
> > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user