Hi, I was going to say that you can use ComponentRenderer for this but looking at its source [1] I see that we create temporary RequestCycle only for #renderPage() but not for #renderComponent(). Also there is no way to use Application#get(name). Please file a ticket for improvement.
In the meantime you can roll your own class by reusing code. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, May 28, 2015 at 12:51 PM, Peter Henderson < peter.hender...@starjar.com> wrote: > 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 > > > > > -- > Peter Henderson >