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