ADF 11 - Cancel+Refresh problem with af:Table
451296May 8 2009 — edited May 11 2009Hello
I making a simple one page CRUD form. (a taks flow made up of one view) I've got an af:panelSplitter with an af:Table in the first panel and an af:panelFormLayout in the second panel.
Both the table and formlayout are bound to the same view object. I've added the buttons in the form layout for next, previous,submit, new etc.
The problem I'm having is with the Cancel and Refresh buttons.
I would like the refresh button to refresh the entire table by re-querying the DB.
I've tried the refresh method, but that only refreshs the current row. I've tried binding to the
execute() method of the data control, and I've tried the executeQuery() method on the IteratorBinding.
In both cases the view seems to be using its cache to refresh. In other words
if I modify a row, submit it (no commit) and then hit refresh, the row selector in the table moves to the top as if the query has been re-executed,
but the modifed row does not revert back to the original DB values.
What's the best way to refresh the entire table with the current DB values ?
For the cancel button I've implemented the code centric solution explained in the
article “How-to-cancel an edit form, undoing edits in Java” by Frank Nimphus 23-Dec-2009
The cancel functions but I get validation errors if the input is incorrect.
In the example the solution for this is to set the “Immediate” properity to true. However as I'm not navigating away from the page this has no effect.
Is there any other way to inform the framework that I do not want any validation to take place ?
The doubt I have is that is this the ADF way of doing a simple CRUD form ? Can ADF handle the above use case in one view or is
the best way to do a CRUD form to split the search and edit functions in two different views as most of the examples/how to's do.
Regards
Paul