You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Dave Schoorl (JIRA)" <ji...@apache.org> on 2009/03/07 18:50:56 UTC

[jira] Commented: (WICKET-2150) Wizard executes onSubmit() of wrong nested form

    [ https://issues.apache.org/jira/browse/WICKET-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679899#action_12679899 ] 

Dave Schoorl commented on WICKET-2150:
--------------------------------------

A possible solution is to make the flow of onSubmit configurable: do you want the onSubmit of IFormSubmittingComponent be triggered before or after the Form's onSubmit(). This would retain backwards compatibility when the default is set to 'before'. The form of the wizard can then be configured to execute the IFormSubmittingComponent's onSubmit() after the form's onSubmit().

A nicer solution would be to replace the onSubmit() of IFormSubmittingComponent into beforeFormOnSubmit() and afterFormOnSubmit(), but of course, this would break backwards compatibility and is not advisable for 1.3.x release. For 1.4 release this could be an option.

> Wizard executes onSubmit() of wrong nested form
> -----------------------------------------------
>
>                 Key: WICKET-2150
>                 URL: https://issues.apache.org/jira/browse/WICKET-2150
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.5, 1.4-RC2
>            Reporter: Dave Schoorl
>             Fix For: 1.3.6, 1.4-RC3
>
>         Attachments: wizard-onsubmit.zip
>
>
> When you have a wizard and the steps in the wizard contain nested forms, the onSubmit() of the next - instead of the current - step's nested form is executed. This is caused by the fact that during the advancing of step A to step B, first the view of A is replaced with the view of B on the wizard's form, and after that, the form's (and nested form's) onSubmit() is called, incorrectly calling the onSubmit() of view B.
> The swapping of the view should happen after the wizard's form (and nested forms) onSubmit() has been called.

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