Ignore:
Timestamp:
Oct 6, 2010, 12:48:17 AM (14 years ago)
Author:
gav
Message:

Change flow of asset and assetSubItem extendedAttribute controllers to return to show views after edit/update or delete.

File:
1 edited

Legend:

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

    r656 r684  
    2222        def assetExtendedAttributeInstance = AssetExtendedAttribute.get( params.id )
    2323        if(assetExtendedAttributeInstance) {
     24            def asset = assetExtendedAttributeInstance.asset
    2425            try {
    2526                assetExtendedAttributeInstance.delete(flush:true)
    2627                flash.message = "AssetExtendedAttribute ${params.id} deleted"
    27                 redirect(controller: "assetDetailed", action: "search")
     28                redirect(controller: "assetDetailed", action: 'show', id: asset.id)
    2829            }
    2930            catch(org.springframework.dao.DataIntegrityViolationException e) {
     
    6566            if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save(flush: true)) {
    6667                flash.message = "AssetExtendedAttribute ${params.id} updated"
    67                 redirect(action:show,id:assetExtendedAttributeInstance.id)
     68                //redirect(action:show,id:assetExtendedAttributeInstance.id)
     69                redirect(controller: 'assetDetailed', action: 'show', id: assetExtendedAttributeInstance.asset.id)
    6870            }
    6971            else {
Note: See TracChangeset for help on using the changeset viewer.