Re: Spring: cannot inject bean with scope request/session

2013-07-08 Thread Alexey Mukas
Hi, 

Thank you very much. Now it works fine)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Spring-cannot-inject-bean-with-scope-request-session-tp4660112p4660145.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Spring: cannot inject bean with scope request/session

2013-07-08 Thread Martin Grigorov
Hi,

In our app we use both:


org.springframework.web.context.ContextLoaderListener



org.springframework.web.context.request.RequestContextListener

in web.xml

The beans config looks like:




and both request and session scoped beans work fine.


On Mon, Jul 8, 2013 at 10:07 AM, Alexey Mukas wrote:

> Hi Martin,
>
> Here is bean config:
> 
> http://www.springframework.org/schema/beans";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd";>
>scope="request">
> 
> 
>
> Java def:
> public class TestClass implements Serializable{
> private static final long serialVersionUID = 2746134459017523678L;
> public String name;
>
> public String getName() {
> return name;
> }
>
> public void setName(String name) {
> this.name = name;
> }
> }
>
> Init:
> @Override
> public void init()
> {
> super.init();
> getComponentInstantiationListeners().add(new
> SpringComponentInjector(this,
> new ClassPathXmlApplicationContext("SpringConfig.xml")));
> }
>
> Quickstart:
> https://mega.co.nz/#!uR0lQKSD!LzrUs1NWpcLJpkrSkK1WMlRT4NQ6JH7A85j4m7hZbjA
>
> Adding  to the bean config didn't help too.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Spring-cannot-inject-bean-with-scope-request-session-tp4660112p4660139.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Spring: cannot inject bean with scope request/session

2013-07-08 Thread Alexey Mukas
Hi Martin,

Here is bean config:

http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd";>




Java def:
public class TestClass implements Serializable{
private static final long serialVersionUID = 2746134459017523678L;
public String name;

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

Init:
@Override
public void init()
{
super.init();
getComponentInstantiationListeners().add(new
SpringComponentInjector(this,
new ClassPathXmlApplicationContext("SpringConfig.xml")));
}

Quickstart:
https://mega.co.nz/#!uR0lQKSD!LzrUs1NWpcLJpkrSkK1WMlRT4NQ6JH7A85j4m7hZbjA

Adding  to the bean config didn't help too.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Spring-cannot-inject-bean-with-scope-request-session-tp4660112p4660139.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Spring: cannot inject bean with scope request/session

2013-07-07 Thread Martin Grigorov
Hi,

How do you define your request scoped bean ?
Show us the code - Java/XML.


On Sun, Jul 7, 2013 at 12:58 PM, Alexey Mukas wrote:

> Hi all,
>
> I'm trying to use Spring in my app.
> Using:
>  - wicket 6.9
>  - spring 3.2.3
>
> Injection works fine with prototype/singleton, but not with request/session
> scope.
> I have following exception: No Scope registered for scope 'request'
>
> I've added
>  
>
>
> org.springframework.web.context.request.RequestContextListener
>   
> but it didn't help
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Spring-cannot-inject-bean-with-scope-request-session-tp4660112.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Spring: cannot inject bean with scope request/session

2013-07-07 Thread Alexey Mukas
Hi Paul,

Thanks for the reply. I've read this guide already, as I said DI works but
only for prototype/singleton beans.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Spring-cannot-inject-bean-with-scope-request-session-tp4660112p4660119.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Spring: cannot inject bean with scope request/session

2013-07-07 Thread Paul BorČ™
See chapter 17 "Integration with enterprise containers of the" of the Wicket 
Free Guide.
Log on to Wicket's homepage, select Books and follow the link from there.

You might be interested in section 17.1 "Integrating Wicket with Spring".

Have a great day,
Paul Bors

On Jul 7, 2013, at 5:58 AM, Alexey Mukas  wrote:

> Hi all,
> 
> I'm trying to use Spring in my app.
> Using:
> - wicket 6.9
> - spring 3.2.3
> 
> Injection works fine with prototype/singleton, but not with request/session
> scope.
> I have following exception: No Scope registered for scope 'request'
> 
> I've added 
> 
> 
> org.springframework.web.context.request.RequestContextListener
>  
>  
> but it didn't help
> 
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Spring-cannot-inject-bean-with-scope-request-session-tp4660112.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Spring: cannot inject bean with scope request/session

2013-07-07 Thread Alexey Mukas
Hi all,

I'm trying to use Spring in my app.
Using:
 - wicket 6.9
 - spring 3.2.3

Injection works fine with prototype/singleton, but not with request/session
scope.
I have following exception: No Scope registered for scope 'request'

I've added 
 
 
org.springframework.web.context.request.RequestContextListener
 
  
but it didn't help



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Spring-cannot-inject-bean-with-scope-request-session-tp4660112.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org