On Tue, Oct 18, 2022 at 1:19 PM Sandor Feher <[email protected]> wrote:

> Okay, the process is  clear now. Thank you.
> The question is which method should I override to inject my code and
> show my panel when indicator shows up.
>

1. Override updateAjaxAttributes() -
https://github.com/apache/wicket/blob/3a29e91665a66dc0dadadcd1edd1abcb124d40b8/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxButton.java#L170
2. Add an IAjaxCallListener to the attributes -
https://github.com/apache/wicket/blob/3a29e91665a66dc0dadadcd1edd1abcb124d40b8/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java#L258
3. Add JS logic to be called onBeforeSend() callback to show your panel



>
>
>
> 2022.10.18. 10:08 keltezéssel, Martin Grigorov írta:
> > On Tue, Oct 18, 2022 at 10:50 AM Sandor Feher <[email protected]>
> wrote:
> >
> >> Hi,
> >>
> >> On Mon, Oct 17, 2022 at 1:23 PM Sandor Feher <[email protected]>
> wrote:
> >>
> >>>> Now I use IndicatingAjaxButton for that but catching it within
> onSubmit
> >>>> is late.
> >>>>
> >>> What do you mean with "is late" ?
> >> As I realized when the first line of onSubmit function is executed the
> >> file(s)  already get
> >> uploaded.
> >>
> >>> When exactly do you need the notifications ?
> >> When uploading process is started.
> >>
> > IndicatingAjaxButton starts showing the indicator before the form
> > submittion (i.e. when the process starts), then the files are uploaded,
> and
> > then when all the data is sent to the server the Form#onSubmit or onError
> > is called, and finally when the Ajax response is returned
> > IndicatingAjaxButton hides the indicator
> >
> >
> >
> >>
> >> --
> >> Üdvözlettel/Kind Regards, Fehér Sándor
> >>
> >>
> >> ...Fehér Sándor...            ---    ....Sandor Feher....
> >>    fejlesztési vezetõ           ---     development manager
> >>    Blue System Kft.             ---      Blue System Ltd.
> >>
> >>
> ..........................................................................................
> >> http://www.bluesystem.hu  :http://www.adatmegorzo.hu  :
> >> http://www.bluehosting.hu
> >>
> >>
> ..........................................................................................
> >>
> >> Kérem gondoljon a környezetre mielõtt kinyomtatná ezt az e-mailt vagy
> >> bármely csatolmányát.
> >> Please consider the environment before printing this e-mail and any
> >> associated attachments.
> >>
>
> --
> Üdvözlettel/Kind Regards, Fehér Sándor
>
>
> ...Fehér Sándor...            ---    ....Sandor Feher....
>   fejlesztési vezetõ           ---     development manager
>   Blue System Kft.             ---      Blue System Ltd.
>
> ..........................................................................................
> http://www.bluesystem.hu : http://www.adatmegorzo.hu :
> http://www.bluehosting.hu
>
> ..........................................................................................
>
> Kérem gondoljon a környezetre mielõtt kinyomtatná ezt az e-mailt vagy
> bármely csatolmányát.
> Please consider the environment before printing this e-mail and any
> associated attachments.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to