Announcement Announcement Module
Collapse
No announcement yet.
Bug in WizardDialog Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug in WizardDialog

    Hi,

    i was testing the WizardDialog in my Application and came across
    following Bug. You can reproduce it in the sample Application too.

    1. Start Petclinic Sample Application
    2. Make a new owner ( Strg+O)
    3. Close the dialog with the "dialog close button" on the upper right
    4. Make (again) a new owner ( Strg+O)

    after this, i get this IllegalArgumentException:

    Code:
    SCHWERWIEGEND: Child model by name 'generalPage' already exists
    java.lang.IllegalArgumentException: Child model by name 'generalPage' already exists
    	at org.springframework.util.Assert.isTrue(Assert.java:137)
    	at org.springframework.rules.values.CompoundFormModel.addChildModel(CompoundFormModel.java:123)
    	at org.springframework.rules.values.CompoundFormModel.createChild(CompoundFormModel.java:79)
    	at org.springframework.richclient.forms.SwingFormModel.createChildPageFormModel(SwingFormModel.java:117)
    	at org.springframework.richclient.forms.AbstractFormPage.<init>&#40;AbstractFormPage.java&#58;76&#41;
    	at org.springframework.richclient.samples.petclinic.ui.OwnerGeneralForm.<init>&#40;OwnerGeneralForm.java&#58;33&#41;
    	at org.springframework.richclient.samples.petclinic.ui.NewOwnerWizard$OwnerGeneralWizardPage.<init>&#40;NewOwnerWizard.java&#58;52&#41;
    	at org.springframework.richclient.samples.petclinic.ui.NewOwnerWizard.addPages&#40;NewOwnerWizard.java&#58;45&#41;
    	at org.springframework.richclient.wizard.WizardDialog.createTitledDialogContentPane&#40;WizardDialog.java&#58;86&#41;
    	at org.springframework.richclient.dialog.TitledApplicationDialog.createDialogContentPane&#40;TitledApplicationDialog.java&#58;135&#41;
    	at org.springframework.richclient.dialog.TitledApplicationDialog.addDialogComponents&#40;TitledApplicationDialog.java&#58;124&#41;
    	at org.springframework.richclient.dialog.ApplicationDialog.createDialog&#40;ApplicationDialog.java&#58;278&#41;
    	at org.springframework.richclient.dialog.ApplicationDialog.showDialog&#40;ApplicationDialog.java&#58;247&#41;
    	at org.springframework.richclient.samples.petclinic.ui.NewOwnerWizard.execute&#40;NewOwnerWizard.java&#58;86&#41;&#91;list&#93;&#91;/list&#93;
    .....
    .....
    I started to debug, but i'm not sure if it is a SwingFormModel.createChildPageFormModel(SwingFormM odel) or a Wizard bug :roll:

    siu
    Claudio


    ps: is there a bug tracking or something?

  • #2
    Claudio,

    Good catch. I will investigate this promptly. Yes, feel free to open JIRA issues for these at the www.springframework.org site.

    Thanks,
    Keith

    Comment


    • #3
      The problem is the dialog -- on closing with the X close button -- is being disposed, and all resources released. On a successive dialog open, the dialog recreates itself, causing recreation of all the pages and page form models. The problem is the wizard form model -- instance of a compound form model -- lives on beyond a single dialog session, and it's complaining it's already been configured.

      Comment


      • #4
        Claudio this should be fixed now; thanks...

        Comment


        • #5
          Keith,

          THANKS!!
          Saw the JIRA email.

          I was not sure if i could change the default close action of the ApplicationDialog, so I came up with this solution:

          Code:
          public WizardDialog&#40;Wizard wizard&#41; &#123;
                  super&#40;null, null, CloseAction.HIDE&#41;;
                   ....
          &#125;

          Hope to catch the next one by myself :wink:

          Claudio

          Comment

          Working...
          X