Ignore:
Timestamp:
Jan 14, 2010, 10:51:03 PM (14 years ago)
Author:
gav
Message:

Refactor classes for asset tree refinement.
Regenerate views and controllers to suite.

Location:
trunk/grails-app/controllers
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/AssetSubItemController.groovy

    r267 r268  
    11import org.codehaus.groovy.grails.plugins.springsecurity.Secured
    22
    3 class AssetTypeController extends BaseAppAdminController {
     3class AssetSubItemController extends BaseAppAdminController {
    44   
    55    def index = { redirect(action:list,params:params) }
     
    1010    def list = {
    1111        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
    12         [ assetTypeInstanceList: AssetType.list( params ), assetTypeInstanceTotal: AssetType.count() ]
     12        [ assetSubItemInstanceList: AssetSubItem.list( params ), assetSubItemInstanceTotal: AssetSubItem.count() ]
    1313    }
    1414
    1515    def show = {
    16         def assetTypeInstance = AssetType.get( params.id )
     16        def assetSubItemInstance = AssetSubItem.get( params.id )
    1717
    18         if(!assetTypeInstance) {
    19             flash.message = "AssetType not found with id ${params.id}"
     18        if(!assetSubItemInstance) {
     19            flash.message = "AssetSubItem not found with id ${params.id}"
    2020            redirect(action:list)
    2121        }
    22         else { return [ assetTypeInstance : assetTypeInstance ] }
     22        else { return [ assetSubItemInstance : assetSubItemInstance ] }
    2323    }
    2424
    2525    def delete = {
    26         def assetTypeInstance = AssetType.get( params.id )
    27         if(assetTypeInstance) {
     26        def assetSubItemInstance = AssetSubItem.get( params.id )
     27        if(assetSubItemInstance) {
    2828            try {
    29                 assetTypeInstance.delete(flush:true)
    30                 flash.message = "AssetType ${params.id} deleted"
     29                assetSubItemInstance.delete(flush:true)
     30                flash.message = "AssetSubItem ${params.id} deleted"
    3131                redirect(action:list)
    3232            }
    3333            catch(org.springframework.dao.DataIntegrityViolationException e) {
    34                 flash.message = "AssetType ${params.id} could not be deleted"
     34                flash.message = "AssetSubItem ${params.id} could not be deleted"
    3535                redirect(action:show,id:params.id)
    3636            }
    3737        }
    3838        else {
    39             flash.message = "AssetType not found with id ${params.id}"
     39            flash.message = "AssetSubItem not found with id ${params.id}"
    4040            redirect(action:list)
    4141        }
     
    4343
    4444    def edit = {
    45         def assetTypeInstance = AssetType.get( params.id )
     45        def assetSubItemInstance = AssetSubItem.get( params.id )
    4646
    47         if(!assetTypeInstance) {
    48             flash.message = "AssetType not found with id ${params.id}"
     47        if(!assetSubItemInstance) {
     48            flash.message = "AssetSubItem not found with id ${params.id}"
    4949            redirect(action:list)
    5050        }
    5151        else {
    52             return [ assetTypeInstance : assetTypeInstance ]
     52            return [ assetSubItemInstance : assetSubItemInstance ]
    5353        }
    5454    }
    5555
    5656    def update = {
    57         def assetTypeInstance = AssetType.get( params.id )
    58         if(assetTypeInstance) {
     57        def assetSubItemInstance = AssetSubItem.get( params.id )
     58        if(assetSubItemInstance) {
    5959            if(params.version) {
    6060                def version = params.version.toLong()
    61                 if(assetTypeInstance.version > version) {
     61                if(assetSubItemInstance.version > version) {
    6262                   
    63                     assetTypeInstance.errors.rejectValue("version", "assetType.optimistic.locking.failure", "Another user has updated this AssetType while you were editing.")
    64                     render(view:'edit',model:[assetTypeInstance:assetTypeInstance])
     63                    assetSubItemInstance.errors.rejectValue("version", "assetSubItem.optimistic.locking.failure", "Another user has updated this AssetSubItem while you were editing.")
     64                    render(view:'edit',model:[assetSubItemInstance:assetSubItemInstance])
    6565                    return
    6666                }
    6767            }
    68             assetTypeInstance.properties = params
    69             if(!assetTypeInstance.hasErrors() && assetTypeInstance.save(flush: true)) {
    70                 flash.message = "AssetType ${params.id} updated"
    71                 redirect(action:show,id:assetTypeInstance.id)
     68            assetSubItemInstance.properties = params
     69            if(!assetSubItemInstance.hasErrors() && assetSubItemInstance.save(flush: true)) {
     70                flash.message = "AssetSubItem ${params.id} updated"
     71                redirect(action:show,id:assetSubItemInstance.id)
    7272            }
    7373            else {
    74                 render(view:'edit',model:[assetTypeInstance:assetTypeInstance])
     74                render(view:'edit',model:[assetSubItemInstance:assetSubItemInstance])
    7575            }
    7676        }
    7777        else {
    78             flash.message = "AssetType not found with id ${params.id}"
     78            flash.message = "AssetSubItem not found with id ${params.id}"
    7979            redirect(action:list)
    8080        }
     
    8282
    8383    def create = {
    84         def assetTypeInstance = new AssetType()
    85         assetTypeInstance.properties = params
    86         return ['assetTypeInstance':assetTypeInstance]
     84        def assetSubItemInstance = new AssetSubItem()
     85        assetSubItemInstance.properties = params
     86        return ['assetSubItemInstance':assetSubItemInstance]
    8787    }
    8888
    8989    def save = {
    90         def assetTypeInstance = new AssetType(params)
    91         if(!assetTypeInstance.hasErrors() && assetTypeInstance.save(flush: true)) {
    92             flash.message = "AssetType ${assetTypeInstance.id} created"
    93             redirect(action:show,id:assetTypeInstance.id)
     90        def assetSubItemInstance = new AssetSubItem(params)
     91        if(!assetSubItemInstance.hasErrors() && assetSubItemInstance.save(flush: true)) {
     92            flash.message = "AssetSubItem ${assetSubItemInstance.id} created"
     93            redirect(action:show,id:assetSubItemInstance.id)
    9494        }
    9595        else {
    96             render(view:'create',model:[assetTypeInstance:assetTypeInstance])
     96            render(view:'create',model:[assetSubItemInstance:assetSubItemInstance])
    9797        }
    9898    }
  • trunk/grails-app/controllers/ExtendedAttributeTypeController.groovy

    r267 r268  
    11import org.codehaus.groovy.grails.plugins.springsecurity.Secured
    22
    3 class AssetExtendedAttributeTypeController extends BaseAppAdminController {
     3class ExtendedAttributeTypeController extends BaseAppAdminController {
    44   
    55    def index = { redirect(action:list,params:params) }
     
    1010    def list = {
    1111        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
    12         [ assetExtendedAttributeTypeInstanceList: AssetExtendedAttributeType.list( params ), assetExtendedAttributeTypeInstanceTotal: AssetExtendedAttributeType.count() ]
     12        [ extendedAttributeTypeInstanceList: ExtendedAttributeType.list( params ), extendedAttributeTypeInstanceTotal: ExtendedAttributeType.count() ]
    1313    }
    1414
    1515    def show = {
    16         def assetExtendedAttributeTypeInstance = AssetExtendedAttributeType.get( params.id )
     16        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
    1717
    18         if(!assetExtendedAttributeTypeInstance) {
    19             flash.message = "AssetExtendedAttributeType not found with id ${params.id}"
     18        if(!extendedAttributeTypeInstance) {
     19            flash.message = "ExtendedAttributeType not found with id ${params.id}"
    2020            redirect(action:list)
    2121        }
    22         else { return [ assetExtendedAttributeTypeInstance : assetExtendedAttributeTypeInstance ] }
     22        else { return [ extendedAttributeTypeInstance : extendedAttributeTypeInstance ] }
    2323    }
    2424
    2525    def delete = {
    26         def assetExtendedAttributeTypeInstance = AssetExtendedAttributeType.get( params.id )
    27         if(assetExtendedAttributeTypeInstance) {
     26        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
     27        if(extendedAttributeTypeInstance) {
    2828            try {
    29                 assetExtendedAttributeTypeInstance.delete(flush:true)
    30                 flash.message = "AssetExtendedAttributeType ${params.id} deleted"
     29                extendedAttributeTypeInstance.delete(flush:true)
     30                flash.message = "ExtendedAttributeType ${params.id} deleted"
    3131                redirect(action:list)
    3232            }
    3333            catch(org.springframework.dao.DataIntegrityViolationException e) {
    34                 flash.message = "AssetExtendedAttributeType ${params.id} could not be deleted"
     34                flash.message = "ExtendedAttributeType ${params.id} could not be deleted"
    3535                redirect(action:show,id:params.id)
    3636            }
    3737        }
    3838        else {
    39             flash.message = "AssetExtendedAttributeType not found with id ${params.id}"
     39            flash.message = "ExtendedAttributeType not found with id ${params.id}"
    4040            redirect(action:list)
    4141        }
     
    4343
    4444    def edit = {
    45         def assetExtendedAttributeTypeInstance = AssetExtendedAttributeType.get( params.id )
     45        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
    4646
    47         if(!assetExtendedAttributeTypeInstance) {
    48             flash.message = "AssetExtendedAttributeType not found with id ${params.id}"
     47        if(!extendedAttributeTypeInstance) {
     48            flash.message = "ExtendedAttributeType not found with id ${params.id}"
    4949            redirect(action:list)
    5050        }
    5151        else {
    52             return [ assetExtendedAttributeTypeInstance : assetExtendedAttributeTypeInstance ]
     52            return [ extendedAttributeTypeInstance : extendedAttributeTypeInstance ]
    5353        }
    5454    }
    5555
    5656    def update = {
    57         def assetExtendedAttributeTypeInstance = AssetExtendedAttributeType.get( params.id )
    58         if(assetExtendedAttributeTypeInstance) {
     57        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
     58        if(extendedAttributeTypeInstance) {
    5959            if(params.version) {
    6060                def version = params.version.toLong()
    61                 if(assetExtendedAttributeTypeInstance.version > version) {
     61                if(extendedAttributeTypeInstance.version > version) {
    6262                   
    63                     assetExtendedAttributeTypeInstance.errors.rejectValue("version", "assetExtendedAttributeType.optimistic.locking.failure", "Another user has updated this AssetExtendedAttributeType while you were editing.")
    64                     render(view:'edit',model:[assetExtendedAttributeTypeInstance:assetExtendedAttributeTypeInstance])
     63                    extendedAttributeTypeInstance.errors.rejectValue("version", "extendedAttributeType.optimistic.locking.failure", "Another user has updated this ExtendedAttributeType while you were editing.")
     64                    render(view:'edit',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
    6565                    return
    6666                }
    6767            }
    68             assetExtendedAttributeTypeInstance.properties = params
    69             if(!assetExtendedAttributeTypeInstance.hasErrors() && assetExtendedAttributeTypeInstance.save(flush: true)) {
    70                 flash.message = "AssetExtendedAttributeType ${params.id} updated"
    71                 redirect(action:show,id:assetExtendedAttributeTypeInstance.id)
     68            extendedAttributeTypeInstance.properties = params
     69            if(!extendedAttributeTypeInstance.hasErrors() && extendedAttributeTypeInstance.save(flush: true)) {
     70                flash.message = "ExtendedAttributeType ${params.id} updated"
     71                redirect(action:show,id:extendedAttributeTypeInstance.id)
    7272            }
    7373            else {
    74                 render(view:'edit',model:[assetExtendedAttributeTypeInstance:assetExtendedAttributeTypeInstance])
     74                render(view:'edit',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
    7575            }
    7676        }
    7777        else {
    78             flash.message = "AssetExtendedAttributeType not found with id ${params.id}"
     78            flash.message = "ExtendedAttributeType not found with id ${params.id}"
    7979            redirect(action:list)
    8080        }
     
    8282
    8383    def create = {
    84         def assetExtendedAttributeTypeInstance = new AssetExtendedAttributeType()
    85         assetExtendedAttributeTypeInstance.properties = params
    86         return ['assetExtendedAttributeTypeInstance':assetExtendedAttributeTypeInstance]
     84        def extendedAttributeTypeInstance = new ExtendedAttributeType()
     85        extendedAttributeTypeInstance.properties = params
     86        return ['extendedAttributeTypeInstance':extendedAttributeTypeInstance]
    8787    }
    8888
    8989    def save = {
    90         def assetExtendedAttributeTypeInstance = new AssetExtendedAttributeType(params)
    91         if(!assetExtendedAttributeTypeInstance.hasErrors() && assetExtendedAttributeTypeInstance.save(flush: true)) {
    92             flash.message = "AssetExtendedAttributeType ${assetExtendedAttributeTypeInstance.id} created"
    93             redirect(action:show,id:assetExtendedAttributeTypeInstance.id)
     90        def extendedAttributeTypeInstance = new ExtendedAttributeType(params)
     91        if(!extendedAttributeTypeInstance.hasErrors() && extendedAttributeTypeInstance.save(flush: true)) {
     92            flash.message = "ExtendedAttributeType ${extendedAttributeTypeInstance.id} created"
     93            redirect(action:show,id:extendedAttributeTypeInstance.id)
    9494        }
    9595        else {
    96             render(view:'create',model:[assetExtendedAttributeTypeInstance:assetExtendedAttributeTypeInstance])
     96            render(view:'create',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
    9797        }
    9898    }
  • trunk/grails-app/controllers/SectionController.groovy

    r267 r268  
    11import org.codehaus.groovy.grails.plugins.springsecurity.Secured
    22
    3 class SystemSectionController extends BaseAppAdminController {
     3class SectionController extends BaseAppAdminController {
    44   
    55    def index = { redirect(action:list,params:params) }
     
    1010    def list = {
    1111        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
    12         [ systemSectionInstanceList: SystemSection.list( params ), systemSectionInstanceTotal: SystemSection.count() ]
     12        [ sectionInstanceList: Section.list( params ), sectionInstanceTotal: Section.count() ]
    1313    }
    1414
    1515    def show = {
    16         def systemSectionInstance = SystemSection.get( params.id )
     16        def sectionInstance = Section.get( params.id )
    1717
    18         if(!systemSectionInstance) {
    19             flash.message = "SystemSection not found with id ${params.id}"
     18        if(!sectionInstance) {
     19            flash.message = "Section not found with id ${params.id}"
    2020            redirect(action:list)
    2121        }
    22         else { return [ systemSectionInstance : systemSectionInstance ] }
     22        else { return [ sectionInstance : sectionInstance ] }
    2323    }
    2424
    2525    def delete = {
    26         def systemSectionInstance = SystemSection.get( params.id )
    27         if(systemSectionInstance) {
     26        def sectionInstance = Section.get( params.id )
     27        if(sectionInstance) {
    2828            try {
    29                 systemSectionInstance.delete(flush:true)
    30                 flash.message = "SystemSection ${params.id} deleted"
     29                sectionInstance.delete(flush:true)
     30                flash.message = "Section ${params.id} deleted"
    3131                redirect(action:list)
    3232            }
    3333            catch(org.springframework.dao.DataIntegrityViolationException e) {
    34                 flash.message = "SystemSection ${params.id} could not be deleted"
     34                flash.message = "Section ${params.id} could not be deleted"
    3535                redirect(action:show,id:params.id)
    3636            }
    3737        }
    3838        else {
    39             flash.message = "SystemSection not found with id ${params.id}"
     39            flash.message = "Section not found with id ${params.id}"
    4040            redirect(action:list)
    4141        }
     
    4343
    4444    def edit = {
    45         def systemSectionInstance = SystemSection.get( params.id )
     45        def sectionInstance = Section.get( params.id )
    4646
    47         if(!systemSectionInstance) {
    48             flash.message = "SystemSection not found with id ${params.id}"
     47        if(!sectionInstance) {
     48            flash.message = "Section not found with id ${params.id}"
    4949            redirect(action:list)
    5050        }
    5151        else {
    52             return [ systemSectionInstance : systemSectionInstance ]
     52            return [ sectionInstance : sectionInstance ]
    5353        }
    5454    }
    5555
    5656    def update = {
    57         def systemSectionInstance = SystemSection.get( params.id )
    58         if(systemSectionInstance) {
     57        def sectionInstance = Section.get( params.id )
     58        if(sectionInstance) {
    5959            if(params.version) {
    6060                def version = params.version.toLong()
    61                 if(systemSectionInstance.version > version) {
     61                if(sectionInstance.version > version) {
    6262                   
    63                     systemSectionInstance.errors.rejectValue("version", "systemSection.optimistic.locking.failure", "Another user has updated this SystemSection while you were editing.")
    64                     render(view:'edit',model:[systemSectionInstance:systemSectionInstance])
     63                    sectionInstance.errors.rejectValue("version", "section.optimistic.locking.failure", "Another user has updated this Section while you were editing.")
     64                    render(view:'edit',model:[sectionInstance:sectionInstance])
    6565                    return
    6666                }
    6767            }
    68             systemSectionInstance.properties = params
    69             if(!systemSectionInstance.hasErrors() && systemSectionInstance.save(flush: true)) {
    70                 flash.message = "SystemSection ${params.id} updated"
    71                 redirect(action:show,id:systemSectionInstance.id)
     68            sectionInstance.properties = params
     69            if(!sectionInstance.hasErrors() && sectionInstance.save(flush: true)) {
     70                flash.message = "Section ${params.id} updated"
     71                redirect(action:show,id:sectionInstance.id)
    7272            }
    7373            else {
    74                 render(view:'edit',model:[systemSectionInstance:systemSectionInstance])
     74                render(view:'edit',model:[sectionInstance:sectionInstance])
    7575            }
    7676        }
    7777        else {
    78             flash.message = "SystemSection not found with id ${params.id}"
     78            flash.message = "Section not found with id ${params.id}"
    7979            redirect(action:list)
    8080        }
     
    8282
    8383    def create = {
    84         def systemSectionInstance = new SystemSection()
    85         systemSectionInstance.properties = params
    86         return ['systemSectionInstance':systemSectionInstance]
     84        def sectionInstance = new Section()
     85        sectionInstance.properties = params
     86        return ['sectionInstance':sectionInstance]
    8787    }
    8888
    8989    def save = {
    90         def systemSectionInstance = new SystemSection(params)
    91         if(!systemSectionInstance.hasErrors() && systemSectionInstance.save(flush: true)) {
    92             flash.message = "SystemSection ${systemSectionInstance.id} created"
    93             redirect(action:show,id:systemSectionInstance.id)
     90        def sectionInstance = new Section(params)
     91        if(!sectionInstance.hasErrors() && sectionInstance.save(flush: true)) {
     92            flash.message = "Section ${sectionInstance.id} created"
     93            redirect(action:show,id:sectionInstance.id)
    9494        }
    9595        else {
    96             render(view:'create',model:[systemSectionInstance:systemSectionInstance])
     96            render(view:'create',model:[sectionInstance:sectionInstance])
    9797        }
    9898    }
  • trunk/grails-app/controllers/SectionDetailedController.groovy

    r267 r268  
    11import org.codehaus.groovy.grails.plugins.springsecurity.Secured
    22
    3 class SystemSectionDetailedController extends BaseController {
     3class SectionDetailedController extends BaseController {
    44   
    55    def index = { redirect(action:list,params:params) }
     
    1010    def list = {
    1111        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
    12         [ systemSectionInstanceList: SystemSection.list( params ), systemSectionInstanceTotal: SystemSection.count() ]
     12        [ sectionInstanceList: Section.list( params ), sectionInstanceTotal: Section.count() ]
    1313    }
    1414
    1515    def show = {
    16         def systemSectionInstance = SystemSection.get( params.id )
     16        def sectionInstance = Section.get( params.id )
    1717
    18         if(!systemSectionInstance) {
    19             flash.message = "SystemSection not found with id ${params.id}"
     18        if(!sectionInstance) {
     19            flash.message = "Section not found with id ${params.id}"
    2020            redirect(action:list)
    2121        }
    22         else { return [ systemSectionInstance : systemSectionInstance ] }
     22        else { return [ sectionInstance : sectionInstance ] }
    2323    }
    2424
    2525    def delete = {
    26         def systemSectionInstance = SystemSection.get( params.id )
    27         if(systemSectionInstance) {
     26        def sectionInstance = Section.get( params.id )
     27        if(sectionInstance) {
    2828            try {
    29                 systemSectionInstance.delete(flush:true)
    30                 flash.message = "SystemSection ${params.id} deleted"
     29                sectionInstance.delete(flush:true)
     30                flash.message = "Section ${params.id} deleted"
    3131                redirect(action:list)
    3232            }
    3333            catch(org.springframework.dao.DataIntegrityViolationException e) {
    34                 flash.message = "SystemSection ${params.id} could not be deleted"
     34                flash.message = "Section ${params.id} could not be deleted"
    3535                redirect(action:show,id:params.id)
    3636            }
    3737        }
    3838        else {
    39             flash.message = "SystemSection not found with id ${params.id}"
     39            flash.message = "Section not found with id ${params.id}"
    4040            redirect(action:list)
    4141        }
     
    4343
    4444    def edit = {
    45         def systemSectionInstance = SystemSection.get( params.id )
     45        def sectionInstance = Section.get( params.id )
    4646
    47         if(!systemSectionInstance) {
    48             flash.message = "SystemSection not found with id ${params.id}"
     47        if(!sectionInstance) {
     48            flash.message = "Section not found with id ${params.id}"
    4949            redirect(action:list)
    5050        }
    5151        else {
    52             return [ systemSectionInstance : systemSectionInstance ]
     52            return [ sectionInstance : sectionInstance ]
    5353        }
    5454    }
    5555
    5656    def update = {
    57         def systemSectionInstance = SystemSection.get( params.id )
    58         if(systemSectionInstance) {
     57        def sectionInstance = Section.get( params.id )
     58        if(sectionInstance) {
    5959            if(params.version) {
    6060                def version = params.version.toLong()
    61                 if(systemSectionInstance.version > version) {
     61                if(sectionInstance.version > version) {
    6262                   
    63                     systemSectionInstance.errors.rejectValue("version", "systemSection.optimistic.locking.failure", "Another user has updated this SystemSection while you were editing.")
    64                     render(view:'edit',model:[systemSectionInstance:systemSectionInstance])
     63                    sectionInstance.errors.rejectValue("version", "section.optimistic.locking.failure", "Another user has updated this Section while you were editing.")
     64                    render(view:'edit',model:[sectionInstance:sectionInstance])
    6565                    return
    6666                }
    6767            }
    68             systemSectionInstance.properties = params
    69             if(!systemSectionInstance.hasErrors() && systemSectionInstance.save(flush: true)) {
    70                 flash.message = "SystemSection ${params.id} updated"
    71                 redirect(action:show,id:systemSectionInstance.id)
     68            sectionInstance.properties = params
     69            if(!sectionInstance.hasErrors() && sectionInstance.save(flush: true)) {
     70                flash.message = "Section ${params.id} updated"
     71                redirect(action:show,id:sectionInstance.id)
    7272            }
    7373            else {
    74                 render(view:'edit',model:[systemSectionInstance:systemSectionInstance])
     74                render(view:'edit',model:[sectionInstance:sectionInstance])
    7575            }
    7676        }
    7777        else {
    78             flash.message = "SystemSection not found with id ${params.id}"
     78            flash.message = "Section not found with id ${params.id}"
    7979            redirect(action:list)
    8080        }
     
    8282
    8383    def create = {
    84         def systemSectionInstance = new SystemSection()
    85         systemSectionInstance.properties = params
    86         return ['systemSectionInstance':systemSectionInstance]
     84        def sectionInstance = new Section()
     85        sectionInstance.properties = params
     86        return ['sectionInstance':sectionInstance]
    8787    }
    8888
    8989    def save = {
    90         def systemSectionInstance = new SystemSection(params)
    91         if(!systemSectionInstance.hasErrors() && systemSectionInstance.save(flush: true)) {
    92             flash.message = "SystemSection ${systemSectionInstance.id} created"
    93             redirect(action:show,id:systemSectionInstance.id)
     90        def sectionInstance = new Section(params)
     91        if(!sectionInstance.hasErrors() && sectionInstance.save(flush: true)) {
     92            flash.message = "Section ${sectionInstance.id} created"
     93            redirect(action:show,id:sectionInstance.id)
    9494        }
    9595        else {
    96             render(view:'create',model:[systemSectionInstance:systemSectionInstance])
     96            render(view:'create',model:[sectionInstance:sectionInstance])
    9797        }
    9898    }
Note: See TracChangeset for help on using the changeset viewer.