This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Use wicket as template engine
Skip to end of metadata
Go to start of metadata

It's possible to use most wicket components just to generate an output. Say to generate html page for email and send via javax.mail.
It takes TemplatePage (child of wicket.Page) implementation and writes result to given java.io.Writer. All stuff like sessions, versioning, request parameters are disabled, TemplatePage is always stateless.
Yes, web page is not the same as email, but very-very close. Of course, it's nearly impossible to reuse the same WebPage, but you can reuse some your components both on WebPage and TemplatePage. And of course it's possible to use most standard wicket components like wicket:border, wicket:extend, repeaters, etc...
Yet another great benefits, but I've not done it yet:

  • it's possible to make auto-linking of resources. Say, if you have <img> on your page, the generated email will have the image attached and properly linked as "cid:" resource.
  • if you have a link in email to your web-site back, it could be properly handled and checked if it actually links to correct Page.

Draft source code is here: http://files.rsdn.ru/20380/WicketTemplater.rar

  • No labels