Derived from Wicket's ComponentRender class: https://bitbucket.org/shadders/wicket-el/src/a41127f0771a4b792255cfc0c2ec47c500db1b1b/src/main/java/com/shadworld/wicket/render/Renderer.java?at=default
Not sure if it will solve the SpringBean problem but it it will work outside a wicket application. Renderer.init(); CharSequence html = Renderer.renderComponent(myPanel); On 14/12/13 02:39, dgn wrote: > Hello- > > I'm attempting to use the Wicket 6 email templating mechanism to render an > HTML email from a Panel OUTSIDE the normal request/response cycle -- in a > timer thread. I have already been successful generating email from within a > normal request by following the examples at > http://www.wicket-library.com/wicket-examples/mailtemplate/ > > The timer thread periodically checks the database for a particular situation > and, if the requirements are met, an email is generated. > > I have searched in vain in this forum for a solution. Two main problems I am > running into are: > - Getting the error message "There is no application attached to current > thread" > - Using @SpringBean does not work outside the Wicket context. This is true > even if I start the time thread within Application.init() > > I'd prefer to generate the email from a Panel as I already have those in > place but would definitely be willing to do so from a page. > > Thanks! > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Generating-email-from-template-outside-request-response-cycle-tp4663011.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
