You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Zbynek Vavros <zb...@gmail.com> on 2018/06/20 08:13:42 UTC

Ajax and async task

Hi,

I've got an AjaxButton and hidden panel with progress bar and status
message which is hidden in the beggining.
My idea is to display the panel when the button is clicked and span long
task.
This task would update a counter that the progress will display using
AjaxSelfUpdatingTimerBehavior.

The problem is that the task has to be run in separate thread so the ajax
completes
and panel is even displayed before task end.

Got the idea from
https://stackoverflow.com/questions/15337198/wicket-calling-a-lengthy-operation-and-updating-through-ajax
.

But I'm getting org.apache.wicket.WicketRuntimeException: There is no
application attached to current thread Thread-XX.

Any suggestions?

Thanks,
Zbynek

Re: Ajax and async task

Posted by Maxim Solodovnik <so...@gmail.com>.
You can use Applucation.get('THE_NAME_OF_YOUR_APP') it works in other
threads as well

On Wed, Jun 20, 2018 at 4:05 PM Zbynek Vavros <zb...@gmail.com>
wrote:

> Still the same:
>
> org.apache.wicket.WicketRuntimeException: There is no application attached
> to current thread pool-XX-thread-XX
>
> Zbynek
>
>
>
> On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
> reiern70@gmail.com> wrote:
>
> > Maybe this can help
> >
> > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> >
> > On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <zb...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I've got an AjaxButton and hidden panel with progress bar and status
> > > message which is hidden in the beggining.
> > > My idea is to display the panel when the button is clicked and span
> long
> > > task.
> > > This task would update a counter that the progress will display using
> > > AjaxSelfUpdatingTimerBehavior.
> > >
> > > The problem is that the task has to be run in separate thread so the
> ajax
> > > completes
> > > and panel is even displayed before task end.
> > >
> > > Got the idea from
> > > https://stackoverflow.com/questions/15337198/wicket-
> > > calling-a-lengthy-operation-and-updating-through-ajax
> > > .
> > >
> > > But I'm getting org.apache.wicket.WicketRuntimeException: There is no
> > > application attached to current thread Thread-XX.
> > >
> > > Any suggestions?
> > >
> > > Thanks,
> > > Zbynek
> > >
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>


-- 
WBR
Maxim aka solomax

Re: Ajax and async task

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Glad to be of help ;-)

On Thu, Jun 21, 2018 at 12:39 AM, Zbynek Vavros <zb...@gmail.com>
wrote:

> Hi Ernesto,
>
> sorry I was away in the afternoon/evening.
> Passing application into runnable constructor is working for me!
>
> Many thanks
>
> On Wed, Jun 20, 2018 at 11:13 AM, Ernesto Reinaldo Barreiro <
> reiern70@gmail.com> wrote:
>
> > https://github.com/reiern70/antilia-bits/blob/master/
> > bgprocess/src/main/java/com/antilia/task/TasksRunnable.java#L28
> >
> > On Wed, Jun 20, 2018 at 12:10 PM, Ernesto Reinaldo Barreiro <
> > reiern70@gmail.com> wrote:
> >
> > > Did you look at
> > >
> > > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> > >
> > >
> > >
> > > On Wed, Jun 20, 2018 at 12:05 PM, Zbynek Vavros <
> zbynekvavros@gmail.com>
> > > wrote:
> > >
> > >> Still the same:
> > >>
> > >> org.apache.wicket.WicketRuntimeException: There is no application
> > >> attached
> > >> to current thread pool-XX-thread-XX
> > >>
> > >> Zbynek
> > >>
> > >>
> > >>
> > >> On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
> > >> reiern70@gmail.com> wrote:
> > >>
> > >> > Maybe this can help
> > >> >
> > >> > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> > >> >
> > >> > On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <
> > zbynekvavros@gmail.com
> > >> >
> > >> > wrote:
> > >> >
> > >> > > Hi,
> > >> > >
> > >> > > I've got an AjaxButton and hidden panel with progress bar and
> status
> > >> > > message which is hidden in the beggining.
> > >> > > My idea is to display the panel when the button is clicked and
> span
> > >> long
> > >> > > task.
> > >> > > This task would update a counter that the progress will display
> > using
> > >> > > AjaxSelfUpdatingTimerBehavior.
> > >> > >
> > >> > > The problem is that the task has to be run in separate thread so
> the
> > >> ajax
> > >> > > completes
> > >> > > and panel is even displayed before task end.
> > >> > >
> > >> > > Got the idea from
> > >> > > https://stackoverflow.com/questions/15337198/wicket-
> > >> > > calling-a-lengthy-operation-and-updating-through-ajax
> > >> > > .
> > >> > >
> > >> > > But I'm getting org.apache.wicket.WicketRuntimeException: There
> is
> > no
> > >> > > application attached to current thread Thread-XX.
> > >> > >
> > >> > > Any suggestions?
> > >> > >
> > >> > > Thanks,
> > >> > > Zbynek
> > >> > >
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Regards - Ernesto Reinaldo Barreiro
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > >
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: Ajax and async task

Posted by Zbynek Vavros <zb...@gmail.com>.
Hi Ernesto,

sorry I was away in the afternoon/evening.
Passing application into runnable constructor is working for me!

Many thanks

On Wed, Jun 20, 2018 at 11:13 AM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> https://github.com/reiern70/antilia-bits/blob/master/
> bgprocess/src/main/java/com/antilia/task/TasksRunnable.java#L28
>
> On Wed, Jun 20, 2018 at 12:10 PM, Ernesto Reinaldo Barreiro <
> reiern70@gmail.com> wrote:
>
> > Did you look at
> >
> > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> >
> >
> >
> > On Wed, Jun 20, 2018 at 12:05 PM, Zbynek Vavros <zb...@gmail.com>
> > wrote:
> >
> >> Still the same:
> >>
> >> org.apache.wicket.WicketRuntimeException: There is no application
> >> attached
> >> to current thread pool-XX-thread-XX
> >>
> >> Zbynek
> >>
> >>
> >>
> >> On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
> >> reiern70@gmail.com> wrote:
> >>
> >> > Maybe this can help
> >> >
> >> > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> >> >
> >> > On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <
> zbynekvavros@gmail.com
> >> >
> >> > wrote:
> >> >
> >> > > Hi,
> >> > >
> >> > > I've got an AjaxButton and hidden panel with progress bar and status
> >> > > message which is hidden in the beggining.
> >> > > My idea is to display the panel when the button is clicked and span
> >> long
> >> > > task.
> >> > > This task would update a counter that the progress will display
> using
> >> > > AjaxSelfUpdatingTimerBehavior.
> >> > >
> >> > > The problem is that the task has to be run in separate thread so the
> >> ajax
> >> > > completes
> >> > > and panel is even displayed before task end.
> >> > >
> >> > > Got the idea from
> >> > > https://stackoverflow.com/questions/15337198/wicket-
> >> > > calling-a-lengthy-operation-and-updating-through-ajax
> >> > > .
> >> > >
> >> > > But I'm getting org.apache.wicket.WicketRuntimeException: There is
> no
> >> > > application attached to current thread Thread-XX.
> >> > >
> >> > > Any suggestions?
> >> > >
> >> > > Thanks,
> >> > > Zbynek
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Regards - Ernesto Reinaldo Barreiro
> >> >
> >>
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>

Re: Ajax and async task

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
https://github.com/reiern70/antilia-bits/blob/master/bgprocess/src/main/java/com/antilia/task/TasksRunnable.java#L28

On Wed, Jun 20, 2018 at 12:10 PM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> Did you look at
>
> https://github.com/reiern70/antilia-bits/tree/master/bgprocess
>
>
>
> On Wed, Jun 20, 2018 at 12:05 PM, Zbynek Vavros <zb...@gmail.com>
> wrote:
>
>> Still the same:
>>
>> org.apache.wicket.WicketRuntimeException: There is no application
>> attached
>> to current thread pool-XX-thread-XX
>>
>> Zbynek
>>
>>
>>
>> On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
>> reiern70@gmail.com> wrote:
>>
>> > Maybe this can help
>> >
>> > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
>> >
>> > On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <zbynekvavros@gmail.com
>> >
>> > wrote:
>> >
>> > > Hi,
>> > >
>> > > I've got an AjaxButton and hidden panel with progress bar and status
>> > > message which is hidden in the beggining.
>> > > My idea is to display the panel when the button is clicked and span
>> long
>> > > task.
>> > > This task would update a counter that the progress will display using
>> > > AjaxSelfUpdatingTimerBehavior.
>> > >
>> > > The problem is that the task has to be run in separate thread so the
>> ajax
>> > > completes
>> > > and panel is even displayed before task end.
>> > >
>> > > Got the idea from
>> > > https://stackoverflow.com/questions/15337198/wicket-
>> > > calling-a-lengthy-operation-and-updating-through-ajax
>> > > .
>> > >
>> > > But I'm getting org.apache.wicket.WicketRuntimeException: There is no
>> > > application attached to current thread Thread-XX.
>> > >
>> > > Any suggestions?
>> > >
>> > > Thanks,
>> > > Zbynek
>> > >
>> >
>> >
>> >
>> > --
>> > Regards - Ernesto Reinaldo Barreiro
>> >
>>
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: Ajax and async task

Posted by Zbynek Vavros <zb...@gmail.com>.
Works just fine for me here.
Seems this may be related to using Google Guice:

org.apache.wicket.WicketRuntimeException: There is no application attached
to current thread Thread-68
    at org.apache.wicket.Application.get(Application.java:236)
    at
org.apache.wicket.guice.GuiceProxyTargetLocator.getInjector(GuiceProxyTargetLocator.java:135)
    at
org.apache.wicket.guice.GuiceProxyTargetLocator.locateProxyTarget(GuiceProxyTargetLocator.java:60)
    at
org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:498)

Zbynek

On Wed, Jun 20, 2018 at 11:30 AM, Maxim Solodovnik <so...@gmail.com>
wrote:

> "There is no application attached to current thread" error is usually mean
> Application.get() is not working ....
>
> On Wed, Jun 20, 2018 at 4:21 PM Zbynek Vavros <zb...@gmail.com>
> wrote:
>
> > Yeah the difference (from what I see) is that ThreadPoolExecutor is used
> in
> > BgProcessApplication.
> > And usage of
> >
> > https://ci.apache.org/projects/wicket/apidocs/6.x/
> org/apache/wicket/Session.html#bind()
> > that is non-related.
> > None of that helps me...
> >
> > @Maxim: Not sure what you mean but ThreadContext.getApplication() returns
> > my application
> > without the need to do anything
> >
> > Zbynek
> >
> > On Wed, Jun 20, 2018 at 11:10 AM, Ernesto Reinaldo Barreiro <
> > reiern70@gmail.com> wrote:
> >
> > > Did you look at
> > >
> > > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> > >
> > >
> > >
> > > On Wed, Jun 20, 2018 at 12:05 PM, Zbynek Vavros <
> zbynekvavros@gmail.com>
> > > wrote:
> > >
> > > > Still the same:
> > > >
> > > > org.apache.wicket.WicketRuntimeException: There is no application
> > > attached
> > > > to current thread pool-XX-thread-XX
> > > >
> > > > Zbynek
> > > >
> > > >
> > > >
> > > > On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
> > > > reiern70@gmail.com> wrote:
> > > >
> > > > > Maybe this can help
> > > > >
> > > > > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> > > > >
> > > > > On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <
> > > zbynekvavros@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I've got an AjaxButton and hidden panel with progress bar and
> > status
> > > > > > message which is hidden in the beggining.
> > > > > > My idea is to display the panel when the button is clicked and
> span
> > > > long
> > > > > > task.
> > > > > > This task would update a counter that the progress will display
> > using
> > > > > > AjaxSelfUpdatingTimerBehavior.
> > > > > >
> > > > > > The problem is that the task has to be run in separate thread so
> > the
> > > > ajax
> > > > > > completes
> > > > > > and panel is even displayed before task end.
> > > > > >
> > > > > > Got the idea from
> > > > > > https://stackoverflow.com/questions/15337198/wicket-
> > > > > > calling-a-lengthy-operation-and-updating-through-ajax
> > > > > > .
> > > > > >
> > > > > > But I'm getting org.apache.wicket.WicketRuntimeException: There
> is
> > > no
> > > > > > application attached to current thread Thread-XX.
> > > > > >
> > > > > > Any suggestions?
> > > > > >
> > > > > > Thanks,
> > > > > > Zbynek
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Regards - Ernesto Reinaldo Barreiro
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > >
> >
>
>
> --
> WBR
> Maxim aka solomax
>

Re: Ajax and async task

Posted by Maxim Solodovnik <so...@gmail.com>.
"There is no application attached to current thread" error is usually mean
Application.get() is not working ....

On Wed, Jun 20, 2018 at 4:21 PM Zbynek Vavros <zb...@gmail.com>
wrote:

> Yeah the difference (from what I see) is that ThreadPoolExecutor is used in
> BgProcessApplication.
> And usage of
>
> https://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/Session.html#bind()
> that is non-related.
> None of that helps me...
>
> @Maxim: Not sure what you mean but ThreadContext.getApplication() returns
> my application
> without the need to do anything
>
> Zbynek
>
> On Wed, Jun 20, 2018 at 11:10 AM, Ernesto Reinaldo Barreiro <
> reiern70@gmail.com> wrote:
>
> > Did you look at
> >
> > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> >
> >
> >
> > On Wed, Jun 20, 2018 at 12:05 PM, Zbynek Vavros <zb...@gmail.com>
> > wrote:
> >
> > > Still the same:
> > >
> > > org.apache.wicket.WicketRuntimeException: There is no application
> > attached
> > > to current thread pool-XX-thread-XX
> > >
> > > Zbynek
> > >
> > >
> > >
> > > On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
> > > reiern70@gmail.com> wrote:
> > >
> > > > Maybe this can help
> > > >
> > > > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> > > >
> > > > On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <
> > zbynekvavros@gmail.com>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I've got an AjaxButton and hidden panel with progress bar and
> status
> > > > > message which is hidden in the beggining.
> > > > > My idea is to display the panel when the button is clicked and span
> > > long
> > > > > task.
> > > > > This task would update a counter that the progress will display
> using
> > > > > AjaxSelfUpdatingTimerBehavior.
> > > > >
> > > > > The problem is that the task has to be run in separate thread so
> the
> > > ajax
> > > > > completes
> > > > > and panel is even displayed before task end.
> > > > >
> > > > > Got the idea from
> > > > > https://stackoverflow.com/questions/15337198/wicket-
> > > > > calling-a-lengthy-operation-and-updating-through-ajax
> > > > > .
> > > > >
> > > > > But I'm getting org.apache.wicket.WicketRuntimeException: There is
> > no
> > > > > application attached to current thread Thread-XX.
> > > > >
> > > > > Any suggestions?
> > > > >
> > > > > Thanks,
> > > > > Zbynek
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Regards - Ernesto Reinaldo Barreiro
> > > >
> > >
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>


-- 
WBR
Maxim aka solomax

Re: Ajax and async task

Posted by Zbynek Vavros <zb...@gmail.com>.
Yeah the difference (from what I see) is that ThreadPoolExecutor is used in
BgProcessApplication.
And usage of
https://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/Session.html#bind()
that is non-related.
None of that helps me...

@Maxim: Not sure what you mean but ThreadContext.getApplication() returns
my application
without the need to do anything

Zbynek

On Wed, Jun 20, 2018 at 11:10 AM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> Did you look at
>
> https://github.com/reiern70/antilia-bits/tree/master/bgprocess
>
>
>
> On Wed, Jun 20, 2018 at 12:05 PM, Zbynek Vavros <zb...@gmail.com>
> wrote:
>
> > Still the same:
> >
> > org.apache.wicket.WicketRuntimeException: There is no application
> attached
> > to current thread pool-XX-thread-XX
> >
> > Zbynek
> >
> >
> >
> > On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
> > reiern70@gmail.com> wrote:
> >
> > > Maybe this can help
> > >
> > > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> > >
> > > On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <
> zbynekvavros@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I've got an AjaxButton and hidden panel with progress bar and status
> > > > message which is hidden in the beggining.
> > > > My idea is to display the panel when the button is clicked and span
> > long
> > > > task.
> > > > This task would update a counter that the progress will display using
> > > > AjaxSelfUpdatingTimerBehavior.
> > > >
> > > > The problem is that the task has to be run in separate thread so the
> > ajax
> > > > completes
> > > > and panel is even displayed before task end.
> > > >
> > > > Got the idea from
> > > > https://stackoverflow.com/questions/15337198/wicket-
> > > > calling-a-lengthy-operation-and-updating-through-ajax
> > > > .
> > > >
> > > > But I'm getting org.apache.wicket.WicketRuntimeException: There is
> no
> > > > application attached to current thread Thread-XX.
> > > >
> > > > Any suggestions?
> > > >
> > > > Thanks,
> > > > Zbynek
> > > >
> > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > >
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>

Re: Ajax and async task

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Did you look at

https://github.com/reiern70/antilia-bits/tree/master/bgprocess



On Wed, Jun 20, 2018 at 12:05 PM, Zbynek Vavros <zb...@gmail.com>
wrote:

> Still the same:
>
> org.apache.wicket.WicketRuntimeException: There is no application attached
> to current thread pool-XX-thread-XX
>
> Zbynek
>
>
>
> On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
> reiern70@gmail.com> wrote:
>
> > Maybe this can help
> >
> > https://github.com/reiern70/antilia-bits/tree/master/bgprocess
> >
> > On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <zb...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I've got an AjaxButton and hidden panel with progress bar and status
> > > message which is hidden in the beggining.
> > > My idea is to display the panel when the button is clicked and span
> long
> > > task.
> > > This task would update a counter that the progress will display using
> > > AjaxSelfUpdatingTimerBehavior.
> > >
> > > The problem is that the task has to be run in separate thread so the
> ajax
> > > completes
> > > and panel is even displayed before task end.
> > >
> > > Got the idea from
> > > https://stackoverflow.com/questions/15337198/wicket-
> > > calling-a-lengthy-operation-and-updating-through-ajax
> > > .
> > >
> > > But I'm getting org.apache.wicket.WicketRuntimeException: There is no
> > > application attached to current thread Thread-XX.
> > >
> > > Any suggestions?
> > >
> > > Thanks,
> > > Zbynek
> > >
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: Ajax and async task

Posted by Zbynek Vavros <zb...@gmail.com>.
Still the same:

org.apache.wicket.WicketRuntimeException: There is no application attached
to current thread pool-XX-thread-XX

Zbynek



On Wed, Jun 20, 2018 at 10:44 AM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> Maybe this can help
>
> https://github.com/reiern70/antilia-bits/tree/master/bgprocess
>
> On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <zb...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I've got an AjaxButton and hidden panel with progress bar and status
> > message which is hidden in the beggining.
> > My idea is to display the panel when the button is clicked and span long
> > task.
> > This task would update a counter that the progress will display using
> > AjaxSelfUpdatingTimerBehavior.
> >
> > The problem is that the task has to be run in separate thread so the ajax
> > completes
> > and panel is even displayed before task end.
> >
> > Got the idea from
> > https://stackoverflow.com/questions/15337198/wicket-
> > calling-a-lengthy-operation-and-updating-through-ajax
> > .
> >
> > But I'm getting org.apache.wicket.WicketRuntimeException: There is no
> > application attached to current thread Thread-XX.
> >
> > Any suggestions?
> >
> > Thanks,
> > Zbynek
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>

Re: Ajax and async task

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Maybe this can help

https://github.com/reiern70/antilia-bits/tree/master/bgprocess

On Wed, Jun 20, 2018 at 11:13 AM, Zbynek Vavros <zb...@gmail.com>
wrote:

> Hi,
>
> I've got an AjaxButton and hidden panel with progress bar and status
> message which is hidden in the beggining.
> My idea is to display the panel when the button is clicked and span long
> task.
> This task would update a counter that the progress will display using
> AjaxSelfUpdatingTimerBehavior.
>
> The problem is that the task has to be run in separate thread so the ajax
> completes
> and panel is even displayed before task end.
>
> Got the idea from
> https://stackoverflow.com/questions/15337198/wicket-
> calling-a-lengthy-operation-and-updating-through-ajax
> .
>
> But I'm getting org.apache.wicket.WicketRuntimeException: There is no
> application attached to current thread Thread-XX.
>
> Any suggestions?
>
> Thanks,
> Zbynek
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: Ajax and async task

Posted by Sebastien Briquet <sb...@apache.org>.
Hi Zbynek,

Some times ago I did a quickstart for async calls with Websocket
notification.
Not exactly your use-case but it can give you some ideas...

https://github.com/sebfz1/wicket-quickstart-cdi-async

Best regards,
Sebastien