LOV for Editable Primary Key in ADF Table Problem
2016-06-22 12:24
399 查看
Probably every ADF developer at least ones was facing this problem - creating LOV for editable primary key attribute rendered in ADF table. Very often database design is based on business key and there is requirement to create LOV for that
key. Unfortunately ADF doesn't handle this case well - LOV defined for editable key in the table is unstable. There are different workarounds, but all of them with the side effects. The best workaround is to fix database design and introduce surrogate key
for the table - but in practice is hardly possible, no one wants to change DB design, especially if it works well in Oracle Forms.
My idea was to upload sample application with this use case into Oracle Cloud. Everyone could access and test it, I'm sure most of you had reproduced same error in your projects. Ideally - Oracle ADF should handle LOV for editable primary key.
Please access live sample application on Oracle Cloud and see it yourself -EditableTableKeyApp
on Oracle Cloud. Same application can be downloaded - EditableTableKeyApp.zip.
Here is how you can test it live. Open application on Oracle Cloud, you should get Employees table displayed:
Open EmployeeId LOV - you will see Departments data, this is correct. I was using numeric Department Id to return into Employee Id - this is just for test, to avoid numeric data duplication. Select value from LOV and try to return it:
Infamous error will be generated - Target Unreachable, identifier 'row' resolved to null:
This happens only for LOV defined on primary key attribute. LOV defined for non key attributes works well in ADF table.
This problem is not reproduced with ADF form, same LOV works:
Value was returned without issues:
This is why I was proposing option to use ADF form for editing data from the table - CRUD
Operations in Oracle ADF 11g Table Without Auto PPR.
By the way - Oracle Java Cloud runs with JDBC XA driver, this is not compatible with ADF BC for Rollback operation. If you click Undo button and invoke Rollback operation - your data will disappear:
Click again Undo couple of times - data will be back.
In this sample I was using LOV defined on primary key attribute and rendered with editable table:
URL : http://andrejusb.blogspot.jp/2013/01/lov-for-editable-primary-key-in-adf.html
key. Unfortunately ADF doesn't handle this case well - LOV defined for editable key in the table is unstable. There are different workarounds, but all of them with the side effects. The best workaround is to fix database design and introduce surrogate key
for the table - but in practice is hardly possible, no one wants to change DB design, especially if it works well in Oracle Forms.
My idea was to upload sample application with this use case into Oracle Cloud. Everyone could access and test it, I'm sure most of you had reproduced same error in your projects. Ideally - Oracle ADF should handle LOV for editable primary key.
Please access live sample application on Oracle Cloud and see it yourself -EditableTableKeyApp
on Oracle Cloud. Same application can be downloaded - EditableTableKeyApp.zip.
Here is how you can test it live. Open application on Oracle Cloud, you should get Employees table displayed:
Open EmployeeId LOV - you will see Departments data, this is correct. I was using numeric Department Id to return into Employee Id - this is just for test, to avoid numeric data duplication. Select value from LOV and try to return it:
Infamous error will be generated - Target Unreachable, identifier 'row' resolved to null:
This happens only for LOV defined on primary key attribute. LOV defined for non key attributes works well in ADF table.
This problem is not reproduced with ADF form, same LOV works:
Value was returned without issues:
This is why I was proposing option to use ADF form for editing data from the table - CRUD
Operations in Oracle ADF 11g Table Without Auto PPR.
By the way - Oracle Java Cloud runs with JDBC XA driver, this is not compatible with ADF BC for Rollback operation. If you click Undo button and invoke Rollback operation - your data will disappear:
Click again Undo couple of times - data will be back.
In this sample I was using LOV defined on primary key attribute and rendered with editable table:
URL : http://andrejusb.blogspot.jp/2013/01/lov-for-editable-primary-key-in-adf.html
相关文章推荐
- 分布式日志收集系统实践(视频教程)
- 分布式日志收集系统实践(视频教程)
- 如何查找native方法
- 让opencv输出人脸检测的得分(置信率)
- 20位最值得关注的 JS 开发者
- 你知道你为什么穷吗?因为你喜欢省钱!
- JQuery中$.ajax()方法参数详解
- leetcode 189. Rotate Array
- 2016年你应该学习的语言和框架
- junit的test 方法执行两次
- Workaround for LOV on Primary Key Attribute
- ubuntu 安装系统 tty1 ctrl+alt+f1 黑屏
- 自己一人如何去做一个web项目
- Volley使用
- .NET获取微信openid
- 查linux开机时间和重启时间
- 文件的操作
- 编程不需要天赋和激情
- Primary Key Importance for LOV View Object
- eclipse里maven install时,报错提示jdk为无效的目标版本:1.7