|
From: Jan H. (JIRA) <no...@sp...> - 2007-12-28 15:36:03
|
[ http://jira.springframework.org/browse/RCP-260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Hoskens closed RCP-260.
---------------------------
Assignee: Jan Hoskens (was: Oliver Hutchison)
Resolution: Cannot Reproduce
Fix Version/s: 0.3.0
I cannot reproduce this. (tried several parent-child wizards)
This was probably fixed when the parent-child hierarchy was reviewed. The AbstractForm.hasErrors() method now delegates to the ValidationResultsModel which takes care of the parent-child relationship concerning errors/warnings etc...
Please reopen with an up-to-date test-case if it is still an issue.
> using addChildForm for validation reporting can leave FormBackedWizardPage form guard in an improper state
> ----------------------------------------------------------------------------------------------------------
>
> Key: RCP-260
> URL: http://jira.springframework.org/browse/RCP-260
> Project: Spring Framework Rich Client Project
> Issue Type: Bug
> Components: Binding System
> Affects Versions: 0.1.0
> Reporter: Frank Bowers
> Assignee: Jan Hoskens
> Fix For: 0.3.0
>
>
> I'm using the version of AbstractForm which has the fix for RCP-254.
> 1. Construct a form with an embedded child form.
> 2. Use addChildForm to properly setup validation results reporting.
> 3. Use the form as the backing form for a FormBackedWizardPage
> 4. Place the form in such a state that there are validation errors only in the child form.
> 5. Invoke Next in the containing wizard to go to the FormBacked page
> 4. Note that the Next button is enabled although the page contains errors if you haven't made the fix below to AbstractForm.hasErrors().
> When FormBackedWizardPage.onAboutToShow is invoked a call to hasErrors is made. Because the parent form doesn't have any errors the page is enabled although the child form has errors.
> The fix is to make AbstractForm.hasErrors() aware of the child forms:
> public boolean hasErrors() {
> if (formModel.getValidationResults().getHasErrors())return true;
> else {
> for (Iterator iter = childForms.values().iterator(); iter.hasNext(); ) {
> Form childForm = (Form) iter.next();
> if (childForm.hasErrors()) return true;
> }
> }
> return false;
> }
--
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
|