You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2007/06/28 21:01:07 UTC

[jira] Resolved: (WICKET-709) Unable to remove an IFormValidator from a Form

     [ https://issues.apache.org/jira/browse/WICKET-709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-709.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-beta3

added form.removeFormValidator(iformvalidator)


> Unable to remove an IFormValidator from a Form
> ----------------------------------------------
>
>                 Key: WICKET-709
>                 URL: https://issues.apache.org/jira/browse/WICKET-709
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.2.6, 1.3.0-beta2
>            Reporter: Jim Hunziker
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-beta3
>
>
> It seems that there is no way to remove an IFormValidator from a Form.  Because the fields in my Form are inside Panels (only one of which is present at any given time), the Form fields are not necessarily children of the Form. 
> When one of the Form's IFormValidators receives a getDependentFormComponents call, it (correctly, I believe) returns the form components that it validates.  An exception occurs when getParent is called on these components (in attempt to find the Form somewhere up the hierarchy) up the call stack. 
> Since the change in the Panel that's present is made via an Ajax update, the same update would be able to remove the offending IFormValidator when its Panel is removed.  (That is, if there was a method in Form to remove an IFormValidator.) 
> For now, I've hacked it so that my IFormValidator checks whether all its Form Components all have parents before any of its methods return non-null values. 
> (I'm not just changing the Panel visibility because then the hidden Panels would still get validated, and I don't want that to happen.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.