Results 1 to 2 of 2

Thread: how can i use velocity in spring roo

  1. #1
    Join Date
    Oct 2012
    Posts
    1

    Default how can i use velocity in spring roo

    i want to use velocity in the project which is build by sring roo.can anyone tell me how to do this. thx.

  2. #2
    Join Date
    Jun 2008
    Location
    Philadelphia, PA, USA
    Posts
    212

    Default

    Well, you're going to have to forgo scaffolding / JSPX files. Which I would say is probably fine.

    So:

    1. Add the TilesViewResolver to your configuration
    2. Configure your Roo app for Velocity with Tiles.

    see http://stackoverflow.com/questions/4...les-and-spring for a discussion.

    Now, you won't be able to use scaffolding, any of the web mvc settings, or the JSPX tags, so one big problem is that the Roo look and feel are hidden behind those JSPX tags. You'll have to implement your own tiles layout template in Velocity instead of JSPX, and velocity macros or something to emit the right form values.

    I assume you know how to work with Velocity for forms, etc., in Spring itself: http://static.springsource.org/sprin...#view-velocity is the reference area.

    You should be able to create your own controllers just by creating the class in the IDE or source code. But don't use web mvc controller - it will add a jspx view, and likey will re-load all tag libraries and re-set up some of the MVC stuff.

    At any rate, back it up, try it out, and if it doesn't work, go back...
    Ken Rimple
    Chariot Solutions
    email: krimple@chariotsolutions.com
    work: www.chariotsolutions.com/education
    personal: www.rimple.com

    Author: Spring Roo in Action (Manning)
    MEAP Site: manning.com/rimple

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •