This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | WizardDescriptor.AsynchronousValidatingPanel is hard to use | ||
---|---|---|---|
Product: | platform | Reporter: | David Konecny <dkonecny> |
Component: | Dialogs&Wizards | Assignee: | Stanislav Aubrecht <saubrecht> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pjiricka, tmysik |
Priority: | P3 | ||
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 228411 | ||
Bug Blocks: |
Description
David Konecny
2011-09-28 20:54:36 UTC
I can also see following strange behaviour: if my valid() throws WizardValidationException then isValid seems to be called immediatelly after that. Why? In my scenario this results into error message being hidden because isValid passes. If I decide to fix this by storing error from validate() then another question raises: when should my wizard panel start paying attention to isValid results instead of validate()?? Yes, I can confirm that AsynchronousValidatingPanel is nearly impossible to use. Please, could you look at it? So clients do not need to do horrible work arounds... Thanks a lot in advance. Better summary. Integrated into 'main-golden', will be available in build *201209190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/327b8ee6ae4b User: Tomas Mysik <tmysik@netbeans.org> Log: #217759 cont'd - failed download should prevent wizard's Next/Finish button AsynchronousValidatingPanel issues work arounded - see #202796. Here are my suggestions/complains: (1) if one throws WizardValidationException from the validate() method, do not call isValid() method (so clients do not need to have any property whether an error in a background validation occured or not) (2) add method finishValidation() (or similar) that would be called in the UI thread after background validation finishes - here one could "unfreeze" the panel (it would be similar as method prepareValidation() and it completes the workflow); now, every client must "unfreeze" his panel in the validate() method using EventQueue.invokeLater() Thanks. (3) If one clicks the Back button, it seems to me that the background thread is not interrupted (but it should be, it is the same case as for the Cancel button). Moreover, the error message should not be displayed I guess. I fixed the problem with disappearing error messages. So now there's no need to hack isValid() method. It is still being called right after background validation but the actual and correct error message will be set later on. I will create a new enhancement issue to introduce some sort of "finishValidation()" method. core-main b42e53fc29ca Thanks a lot Stando! This is perfect! I somehow changed the TM? Sorry. |