r45786: added utility function to clear the selected index state of ace:tabSet.
The only way to fix this is to add a utility function to manually clear the selected index state in the tabset whenever it's called. It's not possible to fix this in an automatic way, where the app developer wouldn't have to do anything, since the very features of the tabset that allow the component to change tabs in an alternative way, such as by using a confirmation dialog, are the same features that cause this issue. At first, I tried to fix this issue in the server side by forcing the renderer to only decode the request if the source was the tabset, but that didn't allow the confirmation dialog to be the one that actually changed the tab. I also tried to force the 'yti' field (which contains the selected index state) to be cleared after the request, but that cleared this field before the request from the confirmation dialog was made, and it wasn't possible to change tabs with the confirmation dialog. Therefore, the only way around this, is to have the app developer clear the selected index state after changing tabs in an alternative way, because the normal clean up procedure has been disrupted.
This utility function is ice.ace.tabset.clearSelectedIndexState(clientId) and takes the client ID of the tabset. In the test app, it's only necessary to add this attribute to the f:ajax tag of the 'Yes' and 'No' buttons in the confirmation dialog:
onevent="function(data) { if (data.status == 'success') ice.ace.tabset.clearSelectedIndexState('iceForm:serverTabSet'); }"
Attach test case that shows this issue.
Steps: