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

Carl-Eric Menzel resolved WICKET-4295.
--------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.4.21)

Fixed in 1.5 and up, won't fix for 1.4.
                
> Allow outer forms to optionally participate in a nested form's submit
> ---------------------------------------------------------------------
>
>                 Key: WICKET-4295
>                 URL: https://issues.apache.org/jira/browse/WICKET-4295
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.19, 1.5.3, 6.0.0-beta1
>            Reporter: Carl-Eric Menzel
>            Assignee: Igor Vaynberg
>         Attachments: 
> WICKET-4295-1.4-allow-outer-forms-to-participate-in-the-submit-of-ne.patch, 
> WICKET-4295-1.5-allow-outer-forms-to-participate-in-the-submit-of-ne.patch, 
> WICKET-4295-trunk-allow-outer-forms-to-participate-in-the-submit-of-ne.patch
>
>
> When a nested form is submitted via a submitting component such as a Button, 
> the browser submits the entire form, and Wicket then determines the correct 
> nested form based on the submitting component's request parameter. Then the 
> nested form is the only one to be processed.
> This is a good default, but sometimes it is desirable to have the outer form 
> submitted as well. For example, a panel that can be used on its own will have 
> a form of its own and also submit button, but it could also be integrated in 
> a larger form.
> The inner form could be modified to allow submitting an outer form, but this 
> seems to be rather inelegant, especially for more widely re-used components. 
> It becomes especially unwieldy when you have a deep component hierarchy.
> Resource string resolution is done in a way that the surrounding containers 
> and the page can override a particular component's strings. I propose that 
> Form gets a new boolean overridable method "wantSubmitOnNestedFormSubmit" 
> that returns false by default to keep behavior the same as in previous 
> versions. onFormSubmitted will then check from the nested submitted form 
> outwards to find the outermost form where this flag is true. This outermost 
> form, if any, will then be submitted.
> This way, an outer form can decide it wants to join the inner form's submit 
> without the inner form having to be modified.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to