Results 1 to 5 of 5

Thread: Bug in WizardDialog

  1. #1
    Join Date
    Aug 2004
    Location
    Switzerland
    Posts
    32

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    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

  3. #3
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    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.

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Claudio this should be fixed now; thanks...

  5. #5
    Join Date
    Aug 2004
    Location
    Switzerland
    Posts
    32

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •