Monday, January 30, 2012

Capturing “Cancel” selection from GWT Activity.mayStop() response

I have a GWT two column display. The left column contains a CellTable with a list of users in the application. When the user selects an user from the list, the right column displays the selected users details - which the user can edit.

I have my Activity wired up to use the mayStop() method so that before switching users, the system will attempt to save any unsaved changes the user has made - as long as there are no validation errors.

My question is about the behavior if there are validation errors. I have it wired to ask the user to discard the unsaved edits or return to the page and correct the issues. My problem is that when the user hits cancel (to return and correct the errors), the cell table still "selects" the new user instead of keeping the user that's in the detail column selected. It appears that switching away from the user activity was canceled, but GWT is still making the CellTable selection. Is there a way to capture the "Cancel" selection, or stop cell table selection from occurring?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment