Sunday, January 1, 2012

Detail List shows duplicate records for all inputfields when click on button having immediate attribute true with resetActionListeneron JDeveloper

We have usecase master detail record, when click on edit button and then clicking on cancel button having immediate attribute true and resetActionListener shows replicated rows in detail list. We have implemented the same scenario using HR schema with entity Jobs as master and Employees as detail and received the same behaviour.
We are using EJB3.0, and JDeveloper We have also checked this issue on JDeveloper and found working properly as expected.

To replicate the same behaviour we created a sample application using HR schema. Following are the detail of our project and procedures.

Creating Sample Application

1. Create new application and select EJB3 and ADF Faces technologies.
2. Create entities from table. Jobs and Employees. (create connection as well with you HR schema)
3. Create SessionBean
4. Create findById method and expose it to local and remote interfaces
Create findJobById method

Your model should looks like above

4. Create DataControl
Data Controls shold looks like above
Create taskflow and view inside it.
Create view, your page should looks like above. Drag and drop datacontrol to create form and table. And have a button with name cancel.

Just to test the scenario provide hardcode value for jobId, I have provided "SH_CLERK" which has many detail records.
Cancel button should looks like above must have immediate property true and resetActionListener

Create jspx page, and drag and drop created task flow in it as Region.
Run the jspx page
Above replicated rows are shown in detail after clicking on Cancel button.

We also observed that the dupliate values shown for those fields which are editable true.

Download source code
I would like to say thanks to Pino for identifying this issue.

Fix is available, please check link
Updated: 03_January_2012