|
From: Johannes S. (JIRA) <no...@sp...> - 2008-02-07 19:38:35
|
AbstractWizard#addPages is called multiple times, when Wizard is reused
-----------------------------------------------------------------------
Key: RCP-536
URL: http://jira.springframework.org/browse/RCP-536
Project: Spring Framework Rich Client Project
Issue Type: Bug
Components: Command System
Affects Versions: 1.0.0
Reporter: Johannes Schneider
Priority: Critical
The method AbstractWizard#addPages is called multiple times when a WizardDialog is shown multiple times.
You can reproduce this using the PetClinitStandalone.
Just open the NewOwnerWizard, enter some values, go to the next page and *cancel*.
Now reopen the wizard. Now the wizard has each page added two times.....
This is a major problem that should be fixed asap. Wizards are almost unusable now.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Jan H. (JIRA) <no...@sp...> - 2008-02-11 08:39:30
|
[ http://jira.springframework.org/browse/RCP-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_31937 ]
Jan Hoskens commented on RCP-536:
---------------------------------
The current default on cancelling/finishing dialogs is to dispose the window. Apparently this disposing is not being handled in in extended classes. They keep their content pane cached when the dialog is disposed. When reopening the wizard, the dialog is constructed anew and the pages are added to the content pane which wasn't disposed. The latter leads to the described behavior.
I'm thinking of resolving this by making the dispose() method non-final and override it where needed. I'll check subclasses of ApplicationDialog to make sure they dispose their content pane and any additional components.
Thanks for reporting.
> AbstractWizard#addPages is called multiple times, when Wizard is reused
> -----------------------------------------------------------------------
>
> Key: RCP-536
> URL: http://jira.springframework.org/browse/RCP-536
> Project: Spring Framework Rich Client Project
> Issue Type: Bug
> Components: Command System
> Affects Versions: 1.0.0
> Reporter: Johannes Schneider
> Priority: Critical
>
> The method AbstractWizard#addPages is called multiple times when a WizardDialog is shown multiple times.
> You can reproduce this using the PetClinitStandalone.
> Just open the NewOwnerWizard, enter some values, go to the next page and *cancel*.
> Now reopen the wizard. Now the wizard has each page added two times.....
> This is a major problem that should be fixed asap. Wizards are almost unusable now.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Jan H. (JIRA) <no...@sp...> - 2008-02-11 09:40:29
|
[ http://jira.springframework.org/browse/RCP-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_31942 ]
Jan Hoskens commented on RCP-536:
---------------------------------
After some more research, it seems that ordinary dialogs don't have this problem. Although they don't dispose their content at the moment the dialog is disposed. A next call to open the dialog will implicitly mean that the old content is dereferenced and set available for garbage collection. (contentPane is a JPanel, when creating contentPane is set to a new JPanel hence the old is dereferenced. Note: can optionally be a problem in custom code if referencing the contentpane.)
The wizardDialog however adds its pages when creating the content pane and these are not dereferenced in the same way. Hence the list of pages is only growing and showing duplicates.
> AbstractWizard#addPages is called multiple times, when Wizard is reused
> -----------------------------------------------------------------------
>
> Key: RCP-536
> URL: http://jira.springframework.org/browse/RCP-536
> Project: Spring Framework Rich Client Project
> Issue Type: Bug
> Components: Command System
> Affects Versions: 1.0.0
> Reporter: Johannes Schneider
> Priority: Critical
>
> The method AbstractWizard#addPages is called multiple times when a WizardDialog is shown multiple times.
> You can reproduce this using the PetClinitStandalone.
> Just open the NewOwnerWizard, enter some values, go to the next page and *cancel*.
> Now reopen the wizard. Now the wizard has each page added two times.....
> This is a major problem that should be fixed asap. Wizards are almost unusable now.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Jan H. (JIRA) <no...@sp...> - 2008-02-12 13:35:30
|
[ http://jira.springframework.org/browse/RCP-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Hoskens closed RCP-536.
---------------------------
Assignee: Jan Hoskens
Resolution: Fixed
Fix Version/s: 1.0.0
The adding of pages is moved to setWizard() of the WizardDialog:
http://spring-rich-c.svn.sourceforge.net/viewvc/spring-rich-c?view=rev&revision=1967
The createDialogContentPane() can be called multiple times when the close action is set to DISPOSE. Therefor an additional method disposeDialogContentPane() is created in ApplicationDialog to allow cleanup of the contentpane.
The addPages() however is not a part of the construction of the contentPane (page.getControl() is) and therefor removed from that method. Placing this in the WizardDialog.setWizard() method changes the behavior defined in javadoc as lazy init, but when creating the container (hence setting things up to show) it seems logical to have the wizard pages available (except for dynamically added pages) and their graphical control will be created lazily when the JDialog is created.
> AbstractWizard#addPages is called multiple times, when Wizard is reused
> -----------------------------------------------------------------------
>
> Key: RCP-536
> URL: http://jira.springframework.org/browse/RCP-536
> Project: Spring Framework Rich Client Project
> Issue Type: Bug
> Components: Command System
> Affects Versions: 1.0.0
> Reporter: Johannes Schneider
> Assignee: Jan Hoskens
> Priority: Critical
> Fix For: 1.0.0
>
>
> The method AbstractWizard#addPages is called multiple times when a WizardDialog is shown multiple times.
> You can reproduce this using the PetClinitStandalone.
> Just open the NewOwnerWizard, enter some values, go to the next page and *cancel*.
> Now reopen the wizard. Now the wizard has each page added two times.....
> This is a major problem that should be fixed asap. Wizards are almost unusable now.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|