Question

I'm using JDeveloper 11.1.1.7.0 and I have this issue. I'll try to explain the best I can.

I have a flow. The first view, named mainTable.jspx, has a table with current data and a New Data button. Each row in table has a setCurrentRowWithKey link to Edit the selected data. With this link, current row is selected.

  • Edit link action is edit flow, which navegates to editData.jspx
  • New Data button action is new flow, which navegates to Create operation and then to editData.jspx with empty fields.

The editData.jspx behaviour is right, so it has empty fields with new flow or fulfilled fields with edit flow.

In editData.jspx I have a custom button Check with an action. I make some checks, so if there is an error, I show an error message with FacesContext.addMessage. This button makes no Delete, Commit or Rollback operation.

Well, my issue arises with these steps:

  • Go to mainTable.jspx
  • Click Edit link in a row
  • Go to editData.jspx
  • Click Check button. One check is not ok, so an error message is displayed. By now, next wrong steps happen.
  • Current selection data removes, and previous data row from the table is shown in editData.jspx
  • When I click Back button to come back to the table in mainTable.jspx, the initial row selected in step 2 is not shown in the table.
  • In database, all data exist, even the ghost data.

I don't know what is happening. There is no Delete, Commit or Rollback operation in the problematic button.

How can I fix this? Is there something I'm not doing right in the flow?

Any help would be very appreciated.

Thank you

Was it helpful?

Solution

Well, the issue happened because a bad use of iterators.

In some checks of my explanation, some steps are getting current row from an iterator, and reuse the same iterator to get another rowset by executeQuery, so current row was lost and it implied an inconsistent state.

The solution is to create another different iterator, from the same view, but a different iterator with different name. So, the main iterator keeps current row, and other additional operationes, queries, etc. are made by different iterator.

Hope it helps. Regards

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top