No, i don't have JSF plans, and i'm not aware of anyone else having them. As for VelocityView, you don't really need it unless you want VelocityTools support included in your tags. You can load and process templates just fine with only a VelocityEngine and any Context instance.
If you do want a VelocityView and need to use your own VelocityEngine instance, then you probably have a lot of work cut out for you, as that isn't well supported at this time. Basically, you will have to subclass VelocityView to override getVelocityEngine() and probably a few other things as well. If you want more details on doing that, i'll help. Just let me know. However, i would seriously question whether that is worth it. You might just find it easier to use the VelocityEngine set up for you by VelocityView, either in parallel with or as a replacement for Spring's. And no, yes, you could just drop your own VelocityView in the application attributes, and ServletUtils would find it. It is not, however, a ServletContextListener. It would only look for it when requested (usually only at init of servlet/tag/filter, not during runtime). Because of this, it is recommended that you use a org.apache.velocity.tools.view.class init-param to point ServletUtils to your custom VelocityView subclass and let it create the instance. Otherwise, just use application.setAttribute(ServletUtils.VELOCITY_VIEW_KEY, myVV), but make sure that the filter/tag/servlet making that call does so before any other servlet/tag/filter that wants the VelocityView. On Thu, Aug 21, 2008 at 11:48 PM, Lilianne E. Blaze <[EMAIL PROTECTED]> wrote: > Thanks, I can't use it as it is, but it's a pretty good starting point. > > Do you have any plans for JSF / Facelets support? Would it be a welcome > addition? I'm willing to contribute what I write (unless I decide > another solution would be more suitable and abandon the idea, but so far > Velocity seems the best choice for my needs). > > One question though - if I use it, and need my own instance of > VelocityEngine (say, initialized and set up by Spring), all I need is to > create and initialize it, then wrap it in VelocityView and > application.setAttribute(VELOCITY_VIEW_KEY,view); it in a > ServletContextListener or equivalent, and it's guaranteed to work, correct? > > If so, how about formalizing it by adding something like > ServletUtils.setVelocityView(ServletContext,VelocityView) ? > > Greetings, L > > Nathan Bubna wrote: >> I have no idea about JSF of Facelets, but there is this: >> >> http://velocity.apache.org/tools/devel/view.tag.html >> http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/view/jsp/VelocityViewTag.html >> >> On Thu, Aug 21, 2008 at 5:28 PM, Lilianne E. Blaze >> <[EMAIL PROTECTED]> wrote: >>> Hello, >>> Are there JSF and/or Facelets -compatible tags available for including >>> Velocity templates? >>> >>> I think I could write them if not, at least a basic version, but I'd prefer >>> not to re-invent the wheel if they're already available somewhere. >>> >>> Greetings, L >>> >>> >>> >>> --------------------------------------------------------------------- >>> 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] >> >> >> > > > > > --------------------------------------------------------------------- > 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]
