grails generate-views and layout

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

grails generate-views and layout

Tomas Hubalek-3
Hi,

first of all I have to say that I'm impressed by Grails. It looks that
it will be killer app for groovy language. Ruby on Rails in  Java style ;-)

I have a question: I would like to have views generated by scaffolding
and/or command "grails generate-views" using layout. I think that it
would be nice to be able to set layout for generated stuff. Is it
possible to change/override templates used by generate-views command?

Thanks
Tom
Reply | Threaded
Open this post in threaded view
|

Re: grails generate-views and layout

graemer
On 02/03/06, Tomas Hubalek <[hidden email]> wrote:
> Hi,
>
> first of all I have to say that I'm impressed by Grails. It looks that
> it will be killer app for groovy language. Ruby on Rails in  Java style ;-)
Thanks Thomas its getting there :-)

>
> I have a question: I would like to have views generated by scaffolding
> and/or command "grails generate-views" using layout. I think that it
> would be nice to be able to set layout for generated stuff. Is it
> possible to change/override templates used by generate-views command?

At the moment no, but maybe they should be user changeable, I'm not
sure.. if you're interested in how they are generated checkout
src/scaffolding/org/codehaus/groovy/grails/scaffolding/DefaultTemplateGenerator.groovy

This is the class that generates the views and controllers.

Having said all that if its just layout you want to change you could
always use a SiteMesh decorator to apply a layout to all generated
pages (see http://grails.codehaus.org/Views+and+Layouts)

Graeme

>
> Thanks
> Tom
>