- Mastering JavaServer Faces 2.2
- Anghel Leonard
- 172字
- 2021-12-08 12:41:31
The none scope
The none scoped beans lives to serve other beans.
The none scope seems to be the black sheep of JSF scopes. Even its name doesn't inspire something useful. Practically, a managed bean in this scope lives as long as a single EL expression evaluation and is not visible in any JSF page. If the application scope lives the longest, this scope lives the shortest. But, if you inject the none scoped managed beans in other managed beans, then they will live as long as their hosts. Actually, this is their job, to serve other beans.
Note
The none scoped objects used in the configuration file indicate managed beans that are used by other managed beans in the application.
So, whenever you need a humble managed bean that is ready to be a part of a cool scope, such as a request or a session, you can annotate it with @NoneScoped
, available in the javax.faces.bean
package. Moreover, objects with the none scope can use other objects with the none scope.
- Learning SQL Server Reporting Services 2012
- FPGA從入門(mén)到精通(實(shí)戰(zhàn)篇)
- 電腦常見(jiàn)問(wèn)題與故障排除
- 電腦常見(jiàn)故障現(xiàn)場(chǎng)處理
- 嵌入式系統(tǒng)設(shè)計(jì)教程
- VCD、DVD原理與維修
- 面向?qū)ο蠓治雠c設(shè)計(jì)(第3版)(修訂版)
- 單片機(jī)原理及應(yīng)用:基于C51+Proteus仿真
- STM32自學(xué)筆記
- Arduino項(xiàng)目開(kāi)發(fā):智能生活
- Raspberry Pi Home Automation with Arduino
- 分布式存儲(chǔ)系統(tǒng):核心技術(shù)、系統(tǒng)實(shí)現(xiàn)與Go項(xiàng)目實(shí)戰(zhàn)
- 計(jì)算機(jī)組裝與維護(hù)
- 計(jì)算機(jī)組裝與維護(hù)教程
- 3D打印:Geomagic Design X5.1 逆向建模設(shè)計(jì)實(shí)用教程