Changeset 178 for trunk/src/templates


Ignore:
Timestamp:
Nov 2, 2009, 3:25:26 PM (15 years ago)
Author:
gav
Message:

Resolve ticket #12 again.
Turn query cache on again since this did not resolve the problem.
Implement fix as per http://jira.codehaus.org/browse/GRAILS-5111, add flush:true to save.
Adjust templates to include above and remove home url.
Re-generate all non detailed views and controllers.
Manually add flush:true and remove home url to detailed views and controllers.

Location:
trunk/src/templates/scaffolding
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/templates/scaffolding/Controller.groovy

    r158 r178  
    6767            }
    6868            ${propertyName}.properties = params
    69             if(!${propertyName}.hasErrors() && ${propertyName}.save()) {
     69            if(!${propertyName}.hasErrors() && ${propertyName}.save(flush: true)) {
    7070                flash.message = "${className} \${params.id} updated"
    7171                redirect(action:show,id:${propertyName}.id)
     
    8989    def save = {
    9090        def ${propertyName} = new ${className}(params)
    91         if(!${propertyName}.hasErrors() && ${propertyName}.save()) {
     91        if(!${propertyName}.hasErrors() && ${propertyName}.save(flush: true)) {
    9292            flash.message = "${className} \${${propertyName}.id} created"
    9393            redirect(action:show,id:${propertyName}.id)
  • trunk/src/templates/scaffolding/create.gsp

    r158 r178  
    55        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    66        <meta name="layout" content="main" />
    7         <title>Create ${className}</title>         
     7        <title>Create ${className}</title>
    88    </head>
    99    <body>
    1010        <div class="nav">
    11             <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
    1211            <span class="menuButton"><g:link class="list" action="list">${className} List</g:link></span>
    1312        </div>
  • trunk/src/templates/scaffolding/edit.gsp

    r158 r178  
    99    <body>
    1010        <div class="nav">
    11             <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
    1211            <span class="menuButton"><g:link class="list" action="list">${className} List</g:link></span>
    1312            <span class="menuButton"><g:link class="create" action="create">New ${className}</g:link></span>
  • trunk/src/templates/scaffolding/list.gsp

    r158 r178  
    99    <body>
    1010        <div class="nav">
    11             <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
    1211            <span class="menuButton"><g:link class="create" action="create">New ${className}</g:link></span>
    1312        </div>
  • trunk/src/templates/scaffolding/show.gsp

    r158 r178  
    99    <body>
    1010        <div class="nav">
    11             <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
    1211            <span class="menuButton"><g:link class="list" action="list">${className} List</g:link></span>
    1312            <span class="menuButton"><g:link class="create" action="create">New ${className}</g:link></span>
Note: See TracChangeset for help on using the changeset viewer.