Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1
-
None
Description
Users reporting the add new type button doesn't do anything. Another user reported problems with Edit button. Cause traced to a different ordering in some cases of when widgets are created and handlers are called, probably caused by the changes done when migrating to Apache. Each dialog has 2 areas: the main contents, and the button bar at the bottom with OK and Cancel. The order of widget construction seems to be 1st: main contents, and 2nd: button bar. If the main contents sets some fields which causes the "handlers" to run for UI events, the button bar OK button is getting enable/disabled according to dialog logic, but it hasn't even been instantiated yet. Fix is to check button bar OK button exists before calling enableOK methods.
In the process, refactoring the code slightly to move this logic to a common spot in super class where possible.