1,Manged bean 和 backing bean的区别(what's the difference between managed bean and backing bean),可以参考下面链接:
1)http://prasanna-adf.blogspot.com/2008/02/managed-bean.html
其中的一段话是:
Backing bean and Managed bean are not different they are the same. Managed bean is about how the bean is created and initialized. Backing bean is about the role a particular managed bean plays.
In other way, Managed bean is a JavaBean registered in the adfc-config.xml file. These beans have properties that are bound to the values of UIComponents.
Backing bean is a special type of managed-bean consisting of properties that are UIComponents. Instead of the bean properties being bound to the UIComponent values, they are instead bound to the UIComponents themselves.
2)http://www.indiastudychannel.com/experts/267-What-difference-between-managed-bean-backing-bean.aspx
2,在ADF中如何创建Managed(Backing) bean
下面介绍了两种方法:
http://udayarocks.wordpress.com/2011/06/08/how-to-create-a-managed-backing-bean-for-any-jspx-page/
3,上面2中介绍的两种方法是在Fusion web application中的;也可以在faces-config.xml中定义Managed(Backing) bean,这也被Oracle称作standard JSF application。
Managed(Backing) bean被定义在哪个文件里,ADF会有不同的处理:
Managed Bean Placement |
Effect |
adfc-config.xml(无边界Task Flow) |
- Managed bean can be of any scope. However, any backing
beans for page fragments or declarative components should
use BackingBean scope.
- When executing within an unbounded task flow,
faces-config.xml will be checked for managed bean
definitions before the adfc-config.xml file.
- Lookup precedence is enforced per scope. Request-scoped
managed beans take precedence over session-scoped
managed beans. Therefore, a request-scoped managed bean
named foo in the adfc-config.xml file will take
precedence over a session-scoped managed bean named
foo in the current task flow definition file.
- Already instantiated beans take precedence over new
instances being instantiated. Therefore, an existing
session-scoped managed bean named foo will always take
precedence over a request-scoped bean named foo defined
in the current task flow definition file.
|
Task flow definition file(有边界Task Flow) |
- Managed bean can be of any scope. However, managed
beans of request scope, of pageFlow scope, of view
scope, or with the scope set to none that are to be accessed
within the task flow definition must be defined within the
task flow definition file. Any backing beans for page
fragments in a task flow should use BackingBean scope.
Managed bean definitions within task flow definition files
will be visible only to activities executing within the same
task flow.
- When executing within a bounded task flow,
faces-config.xml will be checked for managed bean
definitions before the currently executing task flow
definition. If no match is found in either location,
adfc-config.xml and other bootstrap configuration files
will be consulted. However, this lookup in other
adfc-config.xml and bootstrap configuration files will
only occur for session- or application-scoped managed
beans.
- Lookup precedence is enforced per scope. Request-scoped
managed beans take precedence over session-scoped
managed beans. Therefore, a request-scoped managed bean
named foo in the adfc-config.xml file will take
precedence over a session-scoped managed bean named
foo in the current task flow definition file.
- Already instantiated beans take precedence over new
instances being instantiated. Therefore, an existing
session-scoped managed bean named foo will always take
precedence over a request-scoped bean named foo
registered in the current task flow definition file.
- Customizations are allowed.
|
faces-config.xml |
- Managed beans can be of any scope other than pageFlow
scope or view scope.
- When searching for any managed bean, the
faces-config.xml file is always consulted first. Other
configuration files will be searched only if a match is not
found. Therefore, beans registered in the
faces-config.xml file will always win any naming
conflict resolution.
- No customizations can be made.
|
4,在ADF中使用Manage(Backing) bean的best practice
Use managed beans to store logic that is related to the UI rendering only.
All application data and processing should be handled by logic in the business layer of the application. Similar to how you store data-related logic in the database using PL/SQL rather than a Java class, the rule of thumb in a Fusion web application is to store
business-related logic in the middle tier. This way, you can expose this logic as business service methods, which can then become accessible to the ADF Model layer and be available for data binding.
5,不要误认为managed bean从属于任何一个页面,一个managed bean可以为多个页面服务,他的生命周期只与managed bean定义时的scope有关。
更多信息可以参考:
Fusion Developer's Guilde for ADF:Using a Managed Bean in a Fusion Web Application
分享到:
相关推荐
较为全面,课件中有很多例子代码片段,较为实用.比较经典.很值得刚刚学JSF的看看.本内容为managedbean部分的讲解.
了解_Oracle_ADF:入门示例:项目是一个简单的学生会银行帐户。所需的基本功能是输入和编辑支出与存款。
adf manage bean 如何传递参数,大约有4种方式。
ADF常用知识代码总结,managed bean常见代码,一些常见控制的解决方案!
Oracle.adf Oracle ADF 信息库
adf Azure数据工厂
介绍张培新,王静怡,孙军,董国良,王新宇,王新根,戴婷,董进松在ICSE 2020上对论文“通过对抗性采样进行白盒公平性测试”的代码。环境该项目基于python 3.6和tensorflow 1.11。联络人张培新
adf Azure数据工厂项目
ADF4351配置程序,主要是C51配置ADF5351/4350
如果尚未安装conda,请在您的系统上安装它: : 建议使用以下选项配置conda: $ conda config --set auto_activate_base false$ conda config --set env_prompt '({name})'构建库和测试固件需要或更高版本。...
与ADF一起使用时,您可以为Snowflake构建完整的端到端数据仓库解决方案,同时遵循有关可移植性和安全性的Microsoft和Azure最佳实践。 要开始使用,请按照下面的“和部分中概述的步骤进行操作。 自2021年1月起,...
此扩展添加了与 Azure 数据工厂(V1 和 V2)相关的发布任务,以发布 Azure DevOps 的管道。 构建状态 分支 地位 主要的 开发 Azure 数据工厂 Azure DevOps 任务 有关完整文档,请参阅 。 发行说明 2.3 添加了对...
ADF开发必读:oracle JDeveloper Application开发框架和开发工具的使用
英文版的,中文版还在找。貌似中文的ADF设计网上都是付费购买的。。。。
基于80c51f芯片控制的频率合成器adf4360-7
ADF配置文件和标签,有了它,你就可以配置起来你的ADF啦
SGAT_AZURE_ADF 在Azure培训期间重设了pssword并重新使用了相同的帐户
ADF4351锁相环例程,能输出35M~4400M的信号
在MATLAB中检验数据的单位根,关于单位根检测的matlab代码
程序名:ADF4351锁相环频率锁定 程序员:RedClown 时间: 2018/10/13 功能: 频率输出 可用频率范围为80—400MHz 引脚: LCD12864: RS===========>P9^0 RW===========>P9^1 EN===========>P9^2 PSB====...