我是Spring/JSF的新手。当bean更改为@Scope(“请求”)时,Ajax调用不起作用PrimeFaces
我有一个由@Component
其中有一个@Autowired
UserClass
类有注释的控制器,
@Scope(value=org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE)
我需要为每个新的请求,所以我的控制器都被注解@Scope("request")
其中工程创建一个新的UserClass
实例完美地(为每个请求创建新的实例)和这个注解。
但在<p:dataTable>
选择,commondLink,<f:setPropertyActionListener...
注打破了Ajax调用:如果我改变@Scope("request")
到@ViewScoped
阿贾克斯的作品,但我UserClass
成为单身,所有的数据在线程之间共享。
我google了一下,知道我们需要使用JSF注释或者Spring,但是在这里我只使用Spring注解。
而我发现这个,PrimeFaces doesn't work when bean scope is request但无法理解。