Tuesday, March 17, 2015
Corrected Save & Close Action behavior on the Web in v15.1
I wanted to inform you of a small improvement we made last week in response to this customer's request in the Support Center:
T203497 - Web - Close DetailView and navigate to the root ListView by default after executing the "Save And Close" Action
This was requested by more than a dozen of users who previously had to implement a custom ViewController like the one from this tutorial. The reason for this change was that end-users sometimes got confused after a command that was supposed to close the editing form, actually navigated you to a readonly form instead...
Technically, this legacy behavior remained from the old times when it was not possible to show collection properties in the Edit mode of the DetailView. At that time, the Save & Close Action intentionally switched to the View (readonly) mode by default and this switching was required right after adding a new object, because you could only customize these collections in the View mode. Since displaying collection properties in the Edit mode of the DetailView is now the default behavior of new projects created using the XAF solution wizard, the older behavior no longer makes sense.
Let me restate the behavior of the Save & Close Action in v15.1 and ask you opinion on it:
1. If the DetailView was invoked from a nested ListView, Save & Close will save the changes and close that DetailView.
2. If the DetailView was first opened in the View mode from a root ListView, then switched to the Edit mode by an end-user via the Edit Action, then Save & Close will save the changes and return you back to the View mode instead of closing and showing the source ListView.
3. If the DetailView was opened for the newly created object, then Save & Close will save the changes and
3.1. Close the DetailView if CollectionsEditMode == Edit (default)
3.2. Return you back to the View mode instead of closing if if CollectionsEditMode == View.
I am eagerly looking forward to hearing your opinions on this change, especially on point #2, which you may want to change (= close the DetailView in this case as well).