I have a situation where I have a Nested list View inside a detail view. My List View is editable. I also have a controller derived from ListVewAutoCommitController that will commit my parent objects space whenever a list item is edited and the user selects a different row.
Problem:
When the user does make an edit in my list view and moves out of the record to a different object in the list, both my nestedobjectspace and me parent objectspace are committed successfully (using my controller described above.
However when a user makes a change in a listview item and then clicks the Save action (rather than moving up or down to the next record an exception is thrown as follows:
An error with number 1007 has occurred.
Error message: Unable to execute disabled or inactive action Save. Disable reasons: Is modified, inactive reasons:
This disable reason does not sohw in my model so I am guessing the disable reason "Is Modified" reason is part of the default XAF validation rules. In any case why would an "Is Modified" reaon disable a Save action as the whole purpose iof a save action is to save modified objects?
We have closed this ticket because another page addresses its subject:
Error 1007 with ListViewAutoCommitController when clicking an Action that gets disabled during the commit operation
A follow up on this one. Tracing further through this, the ObjectSpaces (both nested and parent) appear to get committed BEFORE the error message above is thrown. I can break point the onsaving and onsaved events of both my master and child object, and they are each being called twice before XAF appears to start reloading the objects and then throwing the above error message
Please see the attached project.
Add a new Estimate object and commit it.
Open the new Estimate object in a detailview.
Add a new Estimate Section in the Nested ListView. This should auto commit because of the ViewController in the project.
Edit the name of the new EstimateSection object in the Nested List View.
BEFORE tabbing or clicking outside of the Name property in the ListView, click the Save action and the Error message listed above will be thrown.
(Title updated)
Hi Kerry,
The ListViewAutoCommitController is not designed to operate in nested list views. Please refer to ticket Q390724 (Error 1007 with ListViewAutoCommitController when clicking an Action that gets disabled during the commit operation).
Thanks,
Michael.