- 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.
- Cortex-M3 + μC/OS-II嵌入式系統(tǒng)開發(fā)入門與應用
- 極簡Spring Cloud實戰(zhàn)
- 電腦常見問題與故障排除
- Effective STL中文版:50條有效使用STL的經(jīng)驗(雙色)
- Linux運維之道(第2版)
- BeagleBone By Example
- 深入淺出SSD:固態(tài)存儲核心技術(shù)、原理與實戰(zhàn)(第2版)
- scikit-learn:Machine Learning Simplified
- Learning Stencyl 3.x Game Development Beginner's Guide
- 計算機維修與維護技術(shù)速成
- 電腦軟硬件維修從入門到精通
- 分布式系統(tǒng)與一致性
- Apple Motion 5 Cookbook
- Building 3D Models with modo 701
- Blender Quick Start Guide