> Is there any reason why the #wantSubmitOnXyz() methods should be public and not protected?
I prefer to be protected too, but as #wantSubmitOnNestedFormSubmit was public, I aligned on that. On Mon, Apr 20, 2015 at 2:53 PM, Martin Grigorov <[email protected]> wrote: > Hi, > > Looks OK to me. > Please add unit (WicketTester) tests for it. > > Is there any reason why the #wantSubmitOnXyz() methods should be public and > not protected? > @Carl-Eric: I think you added #wantSubmitOnNestedFormSubmit(). Any problem > if this is protected in 7.x? > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Mon, Apr 20, 2015 at 3:44 PM, Sebastien <[email protected]> wrote: > > > Hi devs, > > > > I have a recurrent use case where I need to prevent a nested form to be > > processed/validated/submitted. There is already some conditions that > could > > achieve this (Form#isEnabledInHierarchy or #isVisibleInHierarchy), but it > > does not suit well in case of a component/widget which is shown/hidden > > using javascript only (like a Dialog for instance). > > > > Form has a #wantSubmitOnNestedFormSubmit method (default to false), which > > allows to submit a parent form when the nested form is posted. I was > > thinking about having a #wantSubmitOnParentFormSubmit (default to true) > > which does the opposite: preventing a nested form to be submitted. > > > > You can see the code proposal here: > > > > > https://github.com/apache/wicket/commit/e29a7a08a59c9897dcaf3f5df1661cc03a04b644 > > > > (btw, there is/was an error L1014/1025) > > > > What do you think? > > > > Best regards, > > Sebastien. > > >
