Index: /branches/features/grailsUpgrade/grails-app/controllers/AssetDetailedController.groovy =================================================================== --- /branches/features/grailsUpgrade/grails-app/controllers/AssetDetailedController.groovy (revision 884) +++ /branches/features/grailsUpgrade/grails-app/controllers/AssetDetailedController.groovy (revision 885) @@ -42,4 +42,18 @@ def s = assetTreeService.buildAssetTree(params, session) render s + } + + /** + * Build and return the compact asset tree response. + */ + @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) + def assetTreeCompact = { + def assetInstance = Asset.read(params.id) + if(!assetInstance) { + render g.message(code: 'default.not.found', args: ['Asset',params.id]) + return + } + + render(template:"/shared/assetTreeCompact", model:['assetInstance':assetInstance]) } Index: /branches/features/grailsUpgrade/grails-app/views/shared/_assetTreeCompact.gsp =================================================================== --- /branches/features/grailsUpgrade/grails-app/views/shared/_assetTreeCompact.gsp (revision 884) +++ /branches/features/grailsUpgrade/grails-app/views/shared/_assetTreeCompact.gsp (revision 885) @@ -1,13 +1,9 @@ - -<%-- Fetch to prevent lazy initialization error. --%> -<% assetInstance = Asset.read(assetInstance?.id)%> -