0 Replies Latest reply on Apr 8, 2010 8:16 AM by Nicklas Karlsson

    JSFUnit reuse for JBoss Seam 3 JSF headless rendering

    Nicklas Karlsson Master

      Hi,

       

          We're looking for a way of doing headless JSF page rendering (asynchronous mailing and Excel generation) by .xhml templates etc) in Seam3 and
      I'm wondering if parts of JSFUnit could perhaps be re-used for this purpose. Essentially we would like to bootstrap our own application-scoped(?) pet-JSF that could be run asynchronously on mocked requests (or on normal requests/contexts in JSF actions when they are available).

       

      So we could essentially in a JSF action do something like

       

      public class MyBean {
         @Inject JSF jsf;
         public void generateAndSendReport() {
            jsf.render("/wonderpage.xhtml");
         }
      }

       

      and it would just do stuff in the background. Or if it completed work and added something to the request context, it would be available after that call in the action. If it would be some MDB etc doing the stuff, the request context would of course be unavailable but it could still work in the application context.

       

      Do you have any tips or insights?