Monday, April 14, 2008
Manage It! Your guide to modern project management
I'm currently reading Manage It an excellent book written by a fantastic woman Johanna Rothman. I've been doing IT project management for quite sometime now, reading this book though gives me lots of new ideas how to approach IT project management once again. Thank you Johanna
Sunday, April 13, 2008
Controller & Templates in Grails
The common way of using template in Grails is within a GSP page where a page is designed to be composed of different components, each component defined in a template.
In a GSP, one would write
The other way however is to decide about the use of a template directly from a Controller:
A good use-case of using the second way is when an ajax call is made from a GSP page and the result should update a div.
In a GSP, one would write
<g:render template="orderDetailsTemplate"
mode:[orderItems:orderItems]/>
The other way however is to decide about the use of a template directly from a Controller:
class OrderController {
def list = {
def orderItems = OrderItem.list( params )
render(temlate:"orderDetailsTemplate"
model:[ orderItems: orderItems])
}
}
A good use-case of using the second way is when an ajax call is made from a GSP page and the result should update a div.
Subscribe to:
Posts (Atom)