On Fri, May 29, 2015 at 9:22 AM, Christoph Läubrich <lae...@googlemail.com>
wrote:

> Can you explain what is the reason for using a background-thread?
> Depending on your container you might want to use e.g. Continuations or
> Servlet-Async to compute lengthy values in the background and then let
> render the page as normal in the RequestCycle depending on that result.
>
>
In my real application the background thread is a data export routine. I
want to run a list panel with saved page parameters and instead of
rendering the html I'll access the underlying list model to extract the
data, export to csv (or json,etc) and pass it out for other processing.
This way the user can fiddle about with the search filters on the list to
see exactly what they want and later get the raw data (accountants love
spreadsheets).

For example.
This page [1] I'd like to have a plain servlet which can run the component
outside of wicket.


Peter.



[1]
https://demo.starjar.com:25000/Starjar/protected/project/1210005?rpp=25&fn1=Description+Contains&fn2=Date+%5Bmonth+year%5D&fv2=2015+1+1&tab=Time+Sheets



> Am 28.05.2015 11:51, schrieb Peter Henderson:
>
>> Hi
>>
>> I am trying to render a component in a background thread.
>>
>> My first attempt fails with an Exception
>> "There is no application attached to current thread Thread-4"
>>
>>
>>
>> So I link the application with the background thread and now a different
>> exception.
>> java.lang.IllegalArgumentException: Argument 'requestCycle' may not be
>> null.
>>      at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
>>      at
>>
>> org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1568)
>>      at org.apache.wicket.Session.get(Session.java:171)
>>
>>
>> Is component renderer designed to work from a background thread?
>>
>>
>> I've put a quick start on git hub.
>> https://github.com/bollinger/wicket-ComponentRenderer
>>
>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Peter Henderson

Director
Starjar Ltd.
www.starjar.com
0330 088 1662

Reply via email to