The whole idea of a major release is to break API. Making something
more consistent is a rather good use case.

+1

Martijn


On Fri, Jun 17, 2016 at 8:17 PM, Sven Meier <[email protected]> wrote:
> Hi,
>
> AjaxButton's hook method currently get the form as second argument:
>
>     protected void onSubmit(AjaxRequestTarget target, Form<?> form)
>     protected void onAfterSubmit(AjaxRequestTarget target, Form<?> form)
>     protected void onError(AjaxRequestTarget target, Form<?> form)
>
> Would anyone be missing them, if we'd remove the argument in 8.x?
>
>     protected void onSubmit(AjaxRequestTarget target)
>     protected void onAfterSubmit(AjaxRequestTarget target)
>     protected void onError(AjaxRequestTarget target)
>
> AFAIKS subclasses of AjaxButton can just call #getForm() to get hold of the
> submitted form.
>
> This would bring these methods in line with the new lambda factories (which
> don't have a Form argument):
>
>     public static AjaxButton onSubmit(String id,
> WicketBiConsumer<AjaxButton, AjaxRequestTarget> onSubmit)
>     public static AjaxButton onSubmit(String id,
> WicketBiConsumer<AjaxButton, AjaxRequestTarget> onSubmit,
> WicketBiConsumer<AjaxButton, AjaxRequestTarget> onError)
>
> Or perhaps this isn't worth an API break - WDYT?
>
> Have fun
> Sven



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

Reply via email to