I'm going to  add some examples for static pages  in Wicket.  That
is serving files  (or more generally data streams)  by reusing the
powerful Wicket concepts  like IResourceStream, IRequestTarget and
of course  RequestCycle.  By static  pages I mean  stateless pages
not using Components,  in fact those pages can  be also considered
dynamic if you take the example of an XSLT transform.

It consists of simple base classes  and a small example to be able
to integrate static pages in a Wicket application.  For example in
my  current  project,  this  mechanism  is  used  to  display  the
documentation pages,  alongside the  "normal" Wicket  powerful and
stateful Ajax UI.

This is the list of things I wish to add in core (not to mention
examples):

* XSLTResourceStream: IResourceStream that applies XSLT on an
  IResourceStream (WICKET-465)

* URIRequestTargetUrlCodingStrategy: Request coding  strategy that
  uses  a simple  URI (WICKET-469).   I'm also  using that  for my
  soon-to-be-released Wicket  photo gallery, the idea  is that the
  remaining part of the URI after the mount denotes a file path.

* WebExternalResourceStream: An IResourceStream that reads data
  from a file in the web application

* PackageResourceStream: An IResourceStream that reads data from a
  resource in the classpath

And of course the existing FileResourceStream,
ResourceStreamRequestTarget and co are very helpful for serving
static pages.

Currently in  Wicket it's not  obvious how to serve  static pages,
and users have requested this feature, see
http://www.nabble.com/Joost-uses-Wicket-tf3390296.html#a9527502
http://www.nabble.com/Static-pages--tf3026287.html#a8407550

Pointing them to simple examples would help them implement such a
feature in an eye blink.

WDYT?
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Reply via email to