hrbaer
2011-03-29 22:40:54 UTC
Hi all,
I did some research within the forum but I didn't find the answer yet :(
I tried to integrate Spring (using
https://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
Spring + WICKET ) but I still have an error.
I added the following lines to my web.xml:
wicket
org.apache.wicket.protocol.http.WicketServlet
applicationFactoryClassName
org.apache.wicket.spring.SpringWebApplicationFactory
1
contextConfigLocation
/WEB-INF/applicationContext.xml
org.springframework.web.context.ContextLoaderListener
Within my xxxApplication file I added:
public class HomeApplication extends AuthenticatedWebApplication {
private UserService userService;
public void setUserService( UserService userService ) {
this.userService = userService;
}
public UserService getUserService() {
return this.userService;
}
(...)
And within my java file there is:
public class Test extends WebPage {
private UserService getUserService() {
return ( (xxxApplication) getApplication()).getUserService();
}
(...)
}
So if I start the server I invoke the setter of the method setUserService of
my xxxApplication class.
But once I call getUserService() of my java file the return value is null!?
Any ideas?
Thanks in advance.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3416484.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
I did some research within the forum but I didn't find the answer yet :(
I tried to integrate Spring (using
https://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
Spring + WICKET ) but I still have an error.
I added the following lines to my web.xml:
wicket
org.apache.wicket.protocol.http.WicketServlet
applicationFactoryClassName
org.apache.wicket.spring.SpringWebApplicationFactory
1
contextConfigLocation
/WEB-INF/applicationContext.xml
org.springframework.web.context.ContextLoaderListener
Within my xxxApplication file I added:
public class HomeApplication extends AuthenticatedWebApplication {
private UserService userService;
public void setUserService( UserService userService ) {
this.userService = userService;
}
public UserService getUserService() {
return this.userService;
}
(...)
And within my java file there is:
public class Test extends WebPage {
private UserService getUserService() {
return ( (xxxApplication) getApplication()).getUserService();
}
(...)
}
So if I start the server I invoke the setter of the method setUserService of
my xxxApplication class.
But once I call getUserService() of my java file the return value is null!?
Any ideas?
Thanks in advance.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3416484.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org