LOV for Editable Primary Key in ADF Table Problem


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


  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值