JSF 1.2: How to keep request scoped managed bean alive across postbacks on same view?

前端 未结 2 2037
清歌不尽
清歌不尽 2020-11-30 10:23

Is it possible to keep a request scoped bean alive across postbacks on the same page?

The general problem is, as the bean gets trashed on end of request and recreat

2条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 11:10

    Not really, unless you store the Bean somewhere e.g. a Map in application scope, to retrieve it later.

    Why not just make it Session scoped? This is what Session scope is there for, so multiple Requests during the same Session can hit the same state.

提交回复
热议问题