Changeset 178 for trunk/grails-app/controllers
- Timestamp:
- Nov 2, 2009, 3:25:26 PM (15 years ago)
- Location:
- trunk/grails-app/controllers
- Files:
-
- 54 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AppCoreController.groovy
r150 r178 36 36 def personInstance = Person.get(authenticateService.userDomain().id) 37 37 personInstance.properties = params 38 if (!personInstance.hasErrors() && personInstance.save( )) {38 if (!personInstance.hasErrors() && personInstance.save(flush: true)) { 39 39 def sess = getSession() 40 40 sess.setMaxInactiveInterval(personInstance.sessionTimeout) … … 64 64 personInstance.password = authenticateService.encodePassword(personInstance.pass) 65 65 66 if (!personInstance.hasErrors() && personInstance.save( )) {66 if (!personInstance.hasErrors() && personInstance.save(flush: true)) { 67 67 //userCache.removeUserFromCache(personInstance.loginName) 68 68 flash.message = "Password changed successfully." -
trunk/grails-app/controllers/AssemblyController.groovy
r118 r178 27 27 if(assemblyInstance) { 28 28 try { 29 assemblyInstance.delete( )29 assemblyInstance.delete(flush:true) 30 30 flash.message = "Assembly ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 assemblyInstance.properties = params 69 if(!assemblyInstance.hasErrors() && assemblyInstance.save( )) {69 if(!assemblyInstance.hasErrors() && assemblyInstance.save(flush: true)) { 70 70 flash.message = "Assembly ${params.id} updated" 71 71 redirect(action:show,id:assemblyInstance.id) … … 77 77 else { 78 78 flash.message = "Assembly not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def assemblyInstance = new Assembly(params) 91 if(!assemblyInstance.hasErrors() && assemblyInstance.save( )) {91 if(!assemblyInstance.hasErrors() && assemblyInstance.save(flush: true)) { 92 92 flash.message = "Assembly ${assemblyInstance.id} created" 93 93 redirect(action:show,id:assemblyInstance.id) -
trunk/grails-app/controllers/AssetController.groovy
r161 r178 67 67 } 68 68 assetInstance.properties = params 69 if(!assetInstance.hasErrors() && assetInstance.save( )) {69 if(!assetInstance.hasErrors() && assetInstance.save(flush: true)) { 70 70 flash.message = "Asset ${params.id} updated" 71 71 redirect(action:show,id:assetInstance.id) … … 89 89 def save = { 90 90 def assetInstance = new Asset(params) 91 if(!assetInstance.hasErrors() && assetInstance.save( )) {91 if(!assetInstance.hasErrors() && assetInstance.save(flush: true)) { 92 92 flash.message = "Asset ${assetInstance.id} created" 93 93 redirect(action:show,id:assetInstance.id) -
trunk/grails-app/controllers/AssetDetailedController.groovy
r161 r178 93 93 } 94 94 assetInstance.properties = params 95 if(!assetInstance.hasErrors() && assetInstance.save( )) {95 if(!assetInstance.hasErrors() && assetInstance.save(flush: true)) { 96 96 flash.message = "Asset ${params.id} updated" 97 97 redirect(action:show,id:assetInstance.id) … … 115 115 def save = { 116 116 def assetInstance = new Asset(params) 117 if(!assetInstance.hasErrors() && assetInstance.save( )) {117 if(!assetInstance.hasErrors() && assetInstance.save(flush: true)) { 118 118 flash.message = "Asset ${assetInstance.id} created" 119 119 redirect(action:show,id:assetInstance.id) -
trunk/grails-app/controllers/AssetExtendedAttributeController.groovy
r122 r178 27 27 if(assetExtendedAttributeInstance) { 28 28 try { 29 assetExtendedAttributeInstance.delete( )29 assetExtendedAttributeInstance.delete(flush:true) 30 30 flash.message = "AssetExtendedAttribute ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 assetExtendedAttributeInstance.properties = params 69 if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save( )) {69 if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save(flush: true)) { 70 70 flash.message = "AssetExtendedAttribute ${params.id} updated" 71 71 redirect(action:show,id:assetExtendedAttributeInstance.id) … … 77 77 else { 78 78 flash.message = "AssetExtendedAttribute not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def assetExtendedAttributeInstance = new AssetExtendedAttribute(params) 91 if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save( )) {91 if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save(flush: true)) { 92 92 flash.message = "AssetExtendedAttribute ${assetExtendedAttributeInstance.id} created" 93 93 redirect(action:show,id:assetExtendedAttributeInstance.id) -
trunk/grails-app/controllers/AssetExtendedAttributeDetailedController.groovy
r124 r178 67 67 } 68 68 assetExtendedAttributeInstance.properties = params 69 if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save( )) {69 if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save(flush: true)) { 70 70 flash.message = "AssetExtendedAttribute ${params.id} updated" 71 71 redirect(action:show,id:assetExtendedAttributeInstance.id) … … 89 89 def save = { 90 90 def assetExtendedAttributeInstance = new AssetExtendedAttribute(params) 91 if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save( )) {91 if(!assetExtendedAttributeInstance.hasErrors() && assetExtendedAttributeInstance.save(flush: true)) { 92 92 flash.message = "AssetExtendedAttribute ${assetExtendedAttributeInstance.id} created" 93 93 redirect(action:show,id:assetExtendedAttributeInstance.id) -
trunk/grails-app/controllers/AssetExtendedAttributeTypeController.groovy
r122 r178 27 27 if(assetExtendedAttributeTypeInstance) { 28 28 try { 29 assetExtendedAttributeTypeInstance.delete( )29 assetExtendedAttributeTypeInstance.delete(flush:true) 30 30 flash.message = "AssetExtendedAttributeType ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 assetExtendedAttributeTypeInstance.properties = params 69 if(!assetExtendedAttributeTypeInstance.hasErrors() && assetExtendedAttributeTypeInstance.save( )) {69 if(!assetExtendedAttributeTypeInstance.hasErrors() && assetExtendedAttributeTypeInstance.save(flush: true)) { 70 70 flash.message = "AssetExtendedAttributeType ${params.id} updated" 71 71 redirect(action:show,id:assetExtendedAttributeTypeInstance.id) … … 77 77 else { 78 78 flash.message = "AssetExtendedAttributeType not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def assetExtendedAttributeTypeInstance = new AssetExtendedAttributeType(params) 91 if(!assetExtendedAttributeTypeInstance.hasErrors() && assetExtendedAttributeTypeInstance.save( )) {91 if(!assetExtendedAttributeTypeInstance.hasErrors() && assetExtendedAttributeTypeInstance.save(flush: true)) { 92 92 flash.message = "AssetExtendedAttributeType ${assetExtendedAttributeTypeInstance.id} created" 93 93 redirect(action:show,id:assetExtendedAttributeTypeInstance.id) -
trunk/grails-app/controllers/AssetTypeController.groovy
r160 r178 67 67 } 68 68 assetTypeInstance.properties = params 69 if(!assetTypeInstance.hasErrors() && assetTypeInstance.save( )) {69 if(!assetTypeInstance.hasErrors() && assetTypeInstance.save(flush: true)) { 70 70 flash.message = "AssetType ${params.id} updated" 71 71 redirect(action:show,id:assetTypeInstance.id) … … 89 89 def save = { 90 90 def assetTypeInstance = new AssetType(params) 91 if(!assetTypeInstance.hasErrors() && assetTypeInstance.save( )) {91 if(!assetTypeInstance.hasErrors() && assetTypeInstance.save(flush: true)) { 92 92 flash.message = "AssetType ${assetTypeInstance.id} created" 93 93 redirect(action:show,id:assetTypeInstance.id) -
trunk/grails-app/controllers/AssignedPersonController.groovy
r96 r178 27 27 if(assignedPersonInstance) { 28 28 try { 29 assignedPersonInstance.delete( )29 assignedPersonInstance.delete(flush:true) 30 30 flash.message = "AssignedPerson ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 assignedPersonInstance.properties = params 69 if(!assignedPersonInstance.hasErrors() && assignedPersonInstance.save( )) {69 if(!assignedPersonInstance.hasErrors() && assignedPersonInstance.save(flush: true)) { 70 70 flash.message = "AssignedPerson ${params.id} updated" 71 71 redirect(action:show,id:assignedPersonInstance.id) … … 77 77 else { 78 78 flash.message = "AssignedPerson not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def assignedPersonInstance = new AssignedPerson(params) 91 if(!assignedPersonInstance.hasErrors() && assignedPersonInstance.save( )) {91 if(!assignedPersonInstance.hasErrors() && assignedPersonInstance.save(flush: true)) { 92 92 flash.message = "AssignedPerson ${assignedPersonInstance.id} created" 93 93 redirect(action:show,id:assignedPersonInstance.id) -
trunk/grails-app/controllers/AssignedPersonDetailedController.groovy
r147 r178 68 68 } 69 69 assignedPersonInstance.properties = params 70 if(!assignedPersonInstance.hasErrors() && assignedPersonInstance.save( )) {70 if(!assignedPersonInstance.hasErrors() && assignedPersonInstance.save(flush: true)) { 71 71 flash.message = "AssignedPerson ${params.id} updated" 72 72 redirect(action:show,id:assignedPersonInstance.id) … … 97 97 def assignedPersonInstance = new AssignedPerson(params) 98 98 99 if(!assignedPersonInstance.hasErrors() && assignedPersonInstance.save( )) {99 if(!assignedPersonInstance.hasErrors() && assignedPersonInstance.save(flush: true)) { 100 100 flash.message = "AssignedPerson ${assignedPersonInstance.id} created" 101 101 redirect(controller:"taskDetailed", action:"show", id: params.task.id) -
trunk/grails-app/controllers/AuthorityController.groovy
r150 r178 110 110 def authority = new Authority() 111 111 authority.properties = params 112 if (authority.save( )) {112 if (authority.save(flush: true)) { 113 113 redirect action: show, id: authority.id 114 114 } -
trunk/grails-app/controllers/ComponentItemController.groovy
r118 r178 27 27 if(componentItemInstance) { 28 28 try { 29 componentItemInstance.delete( )29 componentItemInstance.delete(flush:true) 30 30 flash.message = "ComponentItem ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 componentItemInstance.properties = params 69 if(!componentItemInstance.hasErrors() && componentItemInstance.save( )) {69 if(!componentItemInstance.hasErrors() && componentItemInstance.save(flush: true)) { 70 70 flash.message = "ComponentItem ${params.id} updated" 71 71 redirect(action:show,id:componentItemInstance.id) … … 77 77 else { 78 78 flash.message = "ComponentItem not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def componentItemInstance = new ComponentItem(params) 91 if(!componentItemInstance.hasErrors() && componentItemInstance.save( )) {91 if(!componentItemInstance.hasErrors() && componentItemInstance.save(flush: true)) { 92 92 flash.message = "ComponentItem ${componentItemInstance.id} created" 93 93 redirect(action:show,id:componentItemInstance.id) -
trunk/grails-app/controllers/DepartmentController.groovy
r162 r178 67 67 } 68 68 departmentInstance.properties = params 69 if(!departmentInstance.hasErrors() && departmentInstance.save( )) {69 if(!departmentInstance.hasErrors() && departmentInstance.save(flush: true)) { 70 70 flash.message = "Department ${params.id} updated" 71 71 redirect(action:show,id:departmentInstance.id) … … 89 89 def save = { 90 90 def departmentInstance = new Department(params) 91 if(!departmentInstance.hasErrors() && departmentInstance.save( )) {91 if(!departmentInstance.hasErrors() && departmentInstance.save(flush: true)) { 92 92 flash.message = "Department ${departmentInstance.id} created" 93 93 redirect(action:show,id:departmentInstance.id) -
trunk/grails-app/controllers/EntryController.groovy
r122 r178 27 27 if(entryInstance) { 28 28 try { 29 entryInstance.delete( )29 entryInstance.delete(flush:true) 30 30 flash.message = "Entry ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 entryInstance.properties = params 69 if(!entryInstance.hasErrors() && entryInstance.save( )) {69 if(!entryInstance.hasErrors() && entryInstance.save(flush: true)) { 70 70 flash.message = "Entry ${params.id} updated" 71 71 redirect(action:show,id:entryInstance.id) … … 77 77 else { 78 78 flash.message = "Entry not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def entryInstance = new Entry(params) 91 if(!entryInstance.hasErrors() && entryInstance.save( )) {91 if(!entryInstance.hasErrors() && entryInstance.save(flush: true)) { 92 92 flash.message = "Entry ${entryInstance.id} created" 93 93 redirect(action:show,id:entryInstance.id) -
trunk/grails-app/controllers/EntryDetailedController.groovy
r147 r178 68 68 if(entryInstance) { 69 69 entryInstance.properties = params 70 if(!entryInstance.hasErrors() && entryInstance.save( )) {70 if(!entryInstance.hasErrors() && entryInstance.save(flush: true)) { 71 71 flash.message = "Entry ${params.id} updated" 72 72 redirect(action:show,id:entryInstance.id) … … 99 99 100 100 entryInstance.enteredBy = Person.get(authenticateService.userDomain().id) 101 if(!entryInstance.hasErrors() && entryInstance.save( )) {101 if(!entryInstance.hasErrors() && entryInstance.save(flush: true)) { 102 102 flash.message = "Entry ${entryInstance.id} created" 103 103 redirect(controller:"taskDetailed", action:"show", id: params.task.id) -
trunk/grails-app/controllers/EntryTypeController.groovy
r122 r178 27 27 if(entryTypeInstance) { 28 28 try { 29 entryTypeInstance.delete( )29 entryTypeInstance.delete(flush:true) 30 30 flash.message = "EntryType ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 entryTypeInstance.properties = params 69 if(!entryTypeInstance.hasErrors() && entryTypeInstance.save( )) {69 if(!entryTypeInstance.hasErrors() && entryTypeInstance.save(flush: true)) { 70 70 flash.message = "EntryType ${params.id} updated" 71 71 redirect(action:show,id:entryTypeInstance.id) … … 77 77 else { 78 78 flash.message = "EntryType not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def entryTypeInstance = new EntryType(params) 91 if(!entryTypeInstance.hasErrors() && entryTypeInstance.save( )) {91 if(!entryTypeInstance.hasErrors() && entryTypeInstance.save(flush: true)) { 92 92 flash.message = "EntryType ${entryTypeInstance.id} created" 93 93 redirect(action:show,id:entryTypeInstance.id) -
trunk/grails-app/controllers/InventoryGroupController.groovy
r116 r178 27 27 if(inventoryGroupInstance) { 28 28 try { 29 inventoryGroupInstance.delete( )29 inventoryGroupInstance.delete(flush:true) 30 30 flash.message = "InventoryGroup ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 inventoryGroupInstance.properties = params 69 if(!inventoryGroupInstance.hasErrors() && inventoryGroupInstance.save( )) {69 if(!inventoryGroupInstance.hasErrors() && inventoryGroupInstance.save(flush: true)) { 70 70 flash.message = "InventoryGroup ${params.id} updated" 71 71 redirect(action:show,id:inventoryGroupInstance.id) … … 77 77 else { 78 78 flash.message = "InventoryGroup not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def inventoryGroupInstance = new InventoryGroup(params) 91 if(!inventoryGroupInstance.hasErrors() && inventoryGroupInstance.save( )) {91 if(!inventoryGroupInstance.hasErrors() && inventoryGroupInstance.save(flush: true)) { 92 92 flash.message = "InventoryGroup ${inventoryGroupInstance.id} created" 93 93 redirect(action:show,id:inventoryGroupInstance.id) -
trunk/grails-app/controllers/InventoryItemController.groovy
r175 r178 67 67 } 68 68 inventoryItemInstance.properties = params 69 if(!inventoryItemInstance.hasErrors() && inventoryItemInstance.save( )) {69 if(!inventoryItemInstance.hasErrors() && inventoryItemInstance.save(flush: true)) { 70 70 flash.message = "InventoryItem ${params.id} updated" 71 71 redirect(action:show,id:inventoryItemInstance.id) … … 89 89 def save = { 90 90 def inventoryItemInstance = new InventoryItem(params) 91 if(!inventoryItemInstance.hasErrors() && inventoryItemInstance.save( )) {91 if(!inventoryItemInstance.hasErrors() && inventoryItemInstance.save(flush: true)) { 92 92 flash.message = "InventoryItem ${inventoryItemInstance.id} created" 93 93 redirect(action:show,id:inventoryItemInstance.id) -
trunk/grails-app/controllers/InventoryItemDetailedController.groovy
r175 r178 20 20 // Quick Search: 21 21 if(!params.filter) { 22 return[ inventoryItemInstanceList: InventoryItem.list( params ), inventoryItemInstanceTotal: InventoryItem.count() ]22 return[ inventoryItemInstanceList: InventoryItem.list( params ), inventoryItemInstanceTotal: InventoryItem.count(), filterParams: params ] 23 23 } 24 24 // filterPane: … … 93 93 } 94 94 inventoryItemInstance.properties = params 95 if(!inventoryItemInstance.hasErrors() && inventoryItemInstance.save( )) {95 if(!inventoryItemInstance.hasErrors() && inventoryItemInstance.save(flush: true)) { 96 96 flash.message = "InventoryItem ${params.id} updated" 97 97 redirect(action:show,id:inventoryItemInstance.id) … … 115 115 def save = { 116 116 def inventoryItemInstance = new InventoryItem(params) 117 if(!inventoryItemInstance.hasErrors() && inventoryItemInstance.save( )) {117 if(!inventoryItemInstance.hasErrors() && inventoryItemInstance.save(flush: true)) { 118 118 flash.message = "InventoryItem ${inventoryItemInstance.id} created" 119 119 redirect(action:show,id:inventoryItemInstance.id) -
trunk/grails-app/controllers/InventoryLocationController.groovy
r175 r178 67 67 } 68 68 inventoryLocationInstance.properties = params 69 if(!inventoryLocationInstance.hasErrors() && inventoryLocationInstance.save( )) {69 if(!inventoryLocationInstance.hasErrors() && inventoryLocationInstance.save(flush: true)) { 70 70 flash.message = "InventoryLocation ${params.id} updated" 71 71 redirect(action:show,id:inventoryLocationInstance.id) … … 89 89 def save = { 90 90 def inventoryLocationInstance = new InventoryLocation(params) 91 if(!inventoryLocationInstance.hasErrors() && inventoryLocationInstance.save( )) {91 if(!inventoryLocationInstance.hasErrors() && inventoryLocationInstance.save(flush: true)) { 92 92 flash.message = "InventoryLocation ${inventoryLocationInstance.id} created" 93 93 redirect(action:show,id:inventoryLocationInstance.id) -
trunk/grails-app/controllers/InventoryLocationDetailedController.groovy
r175 r178 67 67 } 68 68 inventoryLocationInstance.properties = params 69 if(!inventoryLocationInstance.hasErrors() && inventoryLocationInstance.save( )) {69 if(!inventoryLocationInstance.hasErrors() && inventoryLocationInstance.save(flush: true)) { 70 70 flash.message = "InventoryLocation ${params.id} updated" 71 71 redirect(action:show,id:inventoryLocationInstance.id) … … 89 89 def save = { 90 90 def inventoryLocationInstance = new InventoryLocation(params) 91 if(!inventoryLocationInstance.hasErrors() && inventoryLocationInstance.save( )) {91 if(!inventoryLocationInstance.hasErrors() && inventoryLocationInstance.save(flush: true)) { 92 92 flash.message = "InventoryLocation ${inventoryLocationInstance.id} created" 93 93 redirect(action:show,id:inventoryLocationInstance.id) -
trunk/grails-app/controllers/InventoryMovementController.groovy
r175 r178 67 67 } 68 68 inventoryMovementInstance.properties = params 69 if(!inventoryMovementInstance.hasErrors() && inventoryMovementInstance.save( )) {69 if(!inventoryMovementInstance.hasErrors() && inventoryMovementInstance.save(flush: true)) { 70 70 flash.message = "InventoryMovement ${params.id} updated" 71 71 redirect(action:show,id:inventoryMovementInstance.id) … … 89 89 def save = { 90 90 def inventoryMovementInstance = new InventoryMovement(params) 91 if(!inventoryMovementInstance.hasErrors() && inventoryMovementInstance.save( )) {91 if(!inventoryMovementInstance.hasErrors() && inventoryMovementInstance.save(flush: true)) { 92 92 flash.message = "InventoryMovement ${inventoryMovementInstance.id} created" 93 93 redirect(action:show,id:inventoryMovementInstance.id) -
trunk/grails-app/controllers/InventoryMovementTypeController.groovy
r177 r178 67 67 } 68 68 inventoryMovementTypeInstance.properties = params 69 if(!inventoryMovementTypeInstance.hasErrors() && inventoryMovementTypeInstance.save( )) {69 if(!inventoryMovementTypeInstance.hasErrors() && inventoryMovementTypeInstance.save(flush: true)) { 70 70 flash.message = "InventoryMovementType ${params.id} updated" 71 71 redirect(action:show,id:inventoryMovementTypeInstance.id) … … 89 89 def save = { 90 90 def inventoryMovementTypeInstance = new InventoryMovementType(params) 91 if(!inventoryMovementTypeInstance.hasErrors() && inventoryMovementTypeInstance.save( )) {91 if(!inventoryMovementTypeInstance.hasErrors() && inventoryMovementTypeInstance.save(flush: true)) { 92 92 flash.message = "InventoryMovementType ${inventoryMovementTypeInstance.id} created" 93 93 redirect(action:show,id:inventoryMovementTypeInstance.id) -
trunk/grails-app/controllers/InventoryStoreController.groovy
r175 r178 67 67 } 68 68 inventoryStoreInstance.properties = params 69 if(!inventoryStoreInstance.hasErrors() && inventoryStoreInstance.save( )) {69 if(!inventoryStoreInstance.hasErrors() && inventoryStoreInstance.save(flush: true)) { 70 70 flash.message = "InventoryStore ${params.id} updated" 71 71 redirect(action:show,id:inventoryStoreInstance.id) … … 89 89 def save = { 90 90 def inventoryStoreInstance = new InventoryStore(params) 91 if(!inventoryStoreInstance.hasErrors() && inventoryStoreInstance.save( )) {91 if(!inventoryStoreInstance.hasErrors() && inventoryStoreInstance.save(flush: true)) { 92 92 flash.message = "InventoryStore ${inventoryStoreInstance.id} created" 93 93 redirect(action:show,id:inventoryStoreInstance.id) -
trunk/grails-app/controllers/InventoryTypeController.groovy
r116 r178 27 27 if(inventoryTypeInstance) { 28 28 try { 29 inventoryTypeInstance.delete( )29 inventoryTypeInstance.delete(flush:true) 30 30 flash.message = "InventoryType ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 inventoryTypeInstance.properties = params 69 if(!inventoryTypeInstance.hasErrors() && inventoryTypeInstance.save( )) {69 if(!inventoryTypeInstance.hasErrors() && inventoryTypeInstance.save(flush: true)) { 70 70 flash.message = "InventoryType ${params.id} updated" 71 71 redirect(action:show,id:inventoryTypeInstance.id) … … 77 77 else { 78 78 flash.message = "InventoryType not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def inventoryTypeInstance = new InventoryType(params) 91 if(!inventoryTypeInstance.hasErrors() && inventoryTypeInstance.save( )) {91 if(!inventoryTypeInstance.hasErrors() && inventoryTypeInstance.save(flush: true)) { 92 92 flash.message = "InventoryType ${inventoryTypeInstance.id} created" 93 93 redirect(action:show,id:inventoryTypeInstance.id) -
trunk/grails-app/controllers/LifePlanController.groovy
r118 r178 27 27 if(lifePlanInstance) { 28 28 try { 29 lifePlanInstance.delete( )29 lifePlanInstance.delete(flush:true) 30 30 flash.message = "LifePlan ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 lifePlanInstance.properties = params 69 if(!lifePlanInstance.hasErrors() && lifePlanInstance.save( )) {69 if(!lifePlanInstance.hasErrors() && lifePlanInstance.save(flush: true)) { 70 70 flash.message = "LifePlan ${params.id} updated" 71 71 redirect(action:show,id:lifePlanInstance.id) … … 77 77 else { 78 78 flash.message = "LifePlan not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def lifePlanInstance = new LifePlan(params) 91 if(!lifePlanInstance.hasErrors() && lifePlanInstance.save( )) {91 if(!lifePlanInstance.hasErrors() && lifePlanInstance.save(flush: true)) { 92 92 flash.message = "LifePlan ${lifePlanInstance.id} created" 93 93 redirect(action:show,id:lifePlanInstance.id) -
trunk/grails-app/controllers/MaintenanceActionController.groovy
r131 r178 27 27 if(maintenanceActionInstance) { 28 28 try { 29 maintenanceActionInstance.delete( )29 maintenanceActionInstance.delete(flush:true) 30 30 flash.message = "MaintenanceAction ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 maintenanceActionInstance.properties = params 69 if(!maintenanceActionInstance.hasErrors() && maintenanceActionInstance.save( )) {69 if(!maintenanceActionInstance.hasErrors() && maintenanceActionInstance.save(flush: true)) { 70 70 flash.message = "MaintenanceAction ${params.id} updated" 71 71 redirect(action:show,id:maintenanceActionInstance.id) … … 77 77 else { 78 78 flash.message = "MaintenanceAction not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def maintenanceActionInstance = new MaintenanceAction(params) 91 if(!maintenanceActionInstance.hasErrors() && maintenanceActionInstance.save( )) {91 if(!maintenanceActionInstance.hasErrors() && maintenanceActionInstance.save(flush: true)) { 92 92 flash.message = "MaintenanceAction ${maintenanceActionInstance.id} created" 93 93 redirect(action:show,id:maintenanceActionInstance.id) -
trunk/grails-app/controllers/MaintenanceActionDetailedController.groovy
r133 r178 67 67 } 68 68 maintenanceActionInstance.properties = params 69 if(!maintenanceActionInstance.hasErrors() && maintenanceActionInstance.save( )) {69 if(!maintenanceActionInstance.hasErrors() && maintenanceActionInstance.save(flush: true)) { 70 70 flash.message = "MaintenanceAction ${params.id} updated" 71 71 redirect(action:show,id:maintenanceActionInstance.id) … … 89 89 def save = { 90 90 def maintenanceActionInstance = new MaintenanceAction(params) 91 if(!maintenanceActionInstance.hasErrors() && maintenanceActionInstance.save( )) {91 if(!maintenanceActionInstance.hasErrors() && maintenanceActionInstance.save(flush: true)) { 92 92 flash.message = "MaintenanceAction ${maintenanceActionInstance.id} created" 93 93 redirect(action:show,id:maintenanceActionInstance.id) -
trunk/grails-app/controllers/MaintenancePolicyController.groovy
r122 r178 27 27 if(maintenancePolicyInstance) { 28 28 try { 29 maintenancePolicyInstance.delete( )29 maintenancePolicyInstance.delete(flush:true) 30 30 flash.message = "MaintenancePolicy ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 maintenancePolicyInstance.properties = params 69 if(!maintenancePolicyInstance.hasErrors() && maintenancePolicyInstance.save( )) {69 if(!maintenancePolicyInstance.hasErrors() && maintenancePolicyInstance.save(flush: true)) { 70 70 flash.message = "MaintenancePolicy ${params.id} updated" 71 71 redirect(action:show,id:maintenancePolicyInstance.id) … … 77 77 else { 78 78 flash.message = "MaintenancePolicy not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def maintenancePolicyInstance = new MaintenancePolicy(params) 91 if(!maintenancePolicyInstance.hasErrors() && maintenancePolicyInstance.save( )) {91 if(!maintenancePolicyInstance.hasErrors() && maintenancePolicyInstance.save(flush: true)) { 92 92 flash.message = "MaintenancePolicy ${maintenancePolicyInstance.id} created" 93 93 redirect(action:show,id:maintenancePolicyInstance.id) -
trunk/grails-app/controllers/ManufacturerController.groovy
r116 r178 27 27 if(manufacturerInstance) { 28 28 try { 29 manufacturerInstance.delete( )29 manufacturerInstance.delete(flush:true) 30 30 flash.message = "Manufacturer ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 manufacturerInstance.properties = params 69 if(!manufacturerInstance.hasErrors() && manufacturerInstance.save( )) {69 if(!manufacturerInstance.hasErrors() && manufacturerInstance.save(flush: true)) { 70 70 flash.message = "Manufacturer ${params.id} updated" 71 71 redirect(action:show,id:manufacturerInstance.id) … … 77 77 else { 78 78 flash.message = "Manufacturer not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def manufacturerInstance = new Manufacturer(params) 91 if(!manufacturerInstance.hasErrors() && manufacturerInstance.save( )) {91 if(!manufacturerInstance.hasErrors() && manufacturerInstance.save(flush: true)) { 92 92 flash.message = "Manufacturer ${manufacturerInstance.id} created" 93 93 redirect(action:show,id:manufacturerInstance.id) -
trunk/grails-app/controllers/ManufacturerTypeController.groovy
r116 r178 27 27 if(manufacturerTypeInstance) { 28 28 try { 29 manufacturerTypeInstance.delete( )29 manufacturerTypeInstance.delete(flush:true) 30 30 flash.message = "ManufacturerType ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 manufacturerTypeInstance.properties = params 69 if(!manufacturerTypeInstance.hasErrors() && manufacturerTypeInstance.save( )) {69 if(!manufacturerTypeInstance.hasErrors() && manufacturerTypeInstance.save(flush: true)) { 70 70 flash.message = "ManufacturerType ${params.id} updated" 71 71 redirect(action:show,id:manufacturerTypeInstance.id) … … 77 77 else { 78 78 flash.message = "ManufacturerType not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def manufacturerTypeInstance = new ManufacturerType(params) 91 if(!manufacturerTypeInstance.hasErrors() && manufacturerTypeInstance.save( )) {91 if(!manufacturerTypeInstance.hasErrors() && manufacturerTypeInstance.save(flush: true)) { 92 92 flash.message = "ManufacturerType ${manufacturerTypeInstance.id} created" 93 93 redirect(action:show,id:manufacturerTypeInstance.id) -
trunk/grails-app/controllers/PeriodController.groovy
r122 r178 27 27 if(periodInstance) { 28 28 try { 29 periodInstance.delete( )29 periodInstance.delete(flush:true) 30 30 flash.message = "Period ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 periodInstance.properties = params 69 if(!periodInstance.hasErrors() && periodInstance.save( )) {69 if(!periodInstance.hasErrors() && periodInstance.save(flush: true)) { 70 70 flash.message = "Period ${params.id} updated" 71 71 redirect(action:show,id:periodInstance.id) … … 77 77 else { 78 78 flash.message = "Period not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def periodInstance = new Period(params) 91 if(!periodInstance.hasErrors() && periodInstance.save( )) {91 if(!periodInstance.hasErrors() && periodInstance.save(flush: true)) { 92 92 flash.message = "Period ${periodInstance.id} created" 93 93 redirect(action:show,id:periodInstance.id) -
trunk/grails-app/controllers/PersonController.groovy
r150 r178 132 132 } 133 133 134 if (!person.hasErrors() && person.save( )) {134 if (!person.hasErrors() && person.save(flush: true)) { 135 135 Authority.findAll().each { it.removeFromPersons(person) } 136 136 addRoles(person) … … 157 157 person.properties = params 158 158 person.password = authenticateService.encodePassword(params.pass) 159 if (person.save( )) {159 if (person.save(flush: true)) { 160 160 addRoles(person) 161 161 redirect action: show, id: person.id -
trunk/grails-app/controllers/PersonGroupController.groovy
r166 r178 67 67 } 68 68 personGroupInstance.properties = params 69 if(!personGroupInstance.hasErrors() && personGroupInstance.save( )) {69 if(!personGroupInstance.hasErrors() && personGroupInstance.save(flush: true)) { 70 70 flash.message = "PersonGroup ${params.id} updated" 71 71 redirect(action:show,id:personGroupInstance.id) … … 89 89 def save = { 90 90 def personGroupInstance = new PersonGroup(params) 91 if(!personGroupInstance.hasErrors() && personGroupInstance.save( )) {91 if(!personGroupInstance.hasErrors() && personGroupInstance.save(flush: true)) { 92 92 flash.message = "PersonGroup ${personGroupInstance.id} created" 93 93 redirect(action:show,id:personGroupInstance.id) -
trunk/grails-app/controllers/PersonGroupTypeController.groovy
r122 r178 27 27 if(personGroupTypeInstance) { 28 28 try { 29 personGroupTypeInstance.delete( )29 personGroupTypeInstance.delete(flush:true) 30 30 flash.message = "PersonGroupType ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 personGroupTypeInstance.properties = params 69 if(!personGroupTypeInstance.hasErrors() && personGroupTypeInstance.save( )) {69 if(!personGroupTypeInstance.hasErrors() && personGroupTypeInstance.save(flush: true)) { 70 70 flash.message = "PersonGroupType ${params.id} updated" 71 71 redirect(action:show,id:personGroupTypeInstance.id) … … 77 77 else { 78 78 flash.message = "PersonGroupType not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def personGroupTypeInstance = new PersonGroupType(params) 91 if(!personGroupTypeInstance.hasErrors() && personGroupTypeInstance.save( )) {91 if(!personGroupTypeInstance.hasErrors() && personGroupTypeInstance.save(flush: true)) { 92 92 flash.message = "PersonGroupType ${personGroupTypeInstance.id} created" 93 93 redirect(action:show,id:personGroupTypeInstance.id) -
trunk/grails-app/controllers/SiteController.groovy
r163 r178 67 67 } 68 68 siteInstance.properties = params 69 if(!siteInstance.hasErrors() && siteInstance.save( )) {69 if(!siteInstance.hasErrors() && siteInstance.save(flush: true)) { 70 70 flash.message = "Site ${params.id} updated" 71 71 redirect(action:show,id:siteInstance.id) … … 89 89 def save = { 90 90 def siteInstance = new Site(params) 91 if(!siteInstance.hasErrors() && siteInstance.save( )) {91 if(!siteInstance.hasErrors() && siteInstance.save(flush: true)) { 92 92 flash.message = "Site ${siteInstance.id} created" 93 93 redirect(action:show,id:siteInstance.id) -
trunk/grails-app/controllers/SubAssemblyController.groovy
r118 r178 27 27 if(subAssemblyInstance) { 28 28 try { 29 subAssemblyInstance.delete( )29 subAssemblyInstance.delete(flush:true) 30 30 flash.message = "SubAssembly ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 subAssemblyInstance.properties = params 69 if(!subAssemblyInstance.hasErrors() && subAssemblyInstance.save( )) {69 if(!subAssemblyInstance.hasErrors() && subAssemblyInstance.save(flush: true)) { 70 70 flash.message = "SubAssembly ${params.id} updated" 71 71 redirect(action:show,id:subAssemblyInstance.id) … … 77 77 else { 78 78 flash.message = "SubAssembly not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def subAssemblyInstance = new SubAssembly(params) 91 if(!subAssemblyInstance.hasErrors() && subAssemblyInstance.save( )) {91 if(!subAssemblyInstance.hasErrors() && subAssemblyInstance.save(flush: true)) { 92 92 flash.message = "SubAssembly ${subAssemblyInstance.id} created" 93 93 redirect(action:show,id:subAssemblyInstance.id) -
trunk/grails-app/controllers/SupplierController.groovy
r116 r178 27 27 if(supplierInstance) { 28 28 try { 29 supplierInstance.delete( )29 supplierInstance.delete(flush:true) 30 30 flash.message = "Supplier ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 supplierInstance.properties = params 69 if(!supplierInstance.hasErrors() && supplierInstance.save( )) {69 if(!supplierInstance.hasErrors() && supplierInstance.save(flush: true)) { 70 70 flash.message = "Supplier ${params.id} updated" 71 71 redirect(action:show,id:supplierInstance.id) … … 77 77 else { 78 78 flash.message = "Supplier not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def supplierInstance = new Supplier(params) 91 if(!supplierInstance.hasErrors() && supplierInstance.save( )) {91 if(!supplierInstance.hasErrors() && supplierInstance.save(flush: true)) { 92 92 flash.message = "Supplier ${supplierInstance.id} created" 93 93 redirect(action:show,id:supplierInstance.id) -
trunk/grails-app/controllers/SupplierTypeController.groovy
r116 r178 27 27 if(supplierTypeInstance) { 28 28 try { 29 supplierTypeInstance.delete( )29 supplierTypeInstance.delete(flush:true) 30 30 flash.message = "SupplierType ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 supplierTypeInstance.properties = params 69 if(!supplierTypeInstance.hasErrors() && supplierTypeInstance.save( )) {69 if(!supplierTypeInstance.hasErrors() && supplierTypeInstance.save(flush: true)) { 70 70 flash.message = "SupplierType ${params.id} updated" 71 71 redirect(action:show,id:supplierTypeInstance.id) … … 77 77 else { 78 78 flash.message = "SupplierType not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def supplierTypeInstance = new SupplierType(params) 91 if(!supplierTypeInstance.hasErrors() && supplierTypeInstance.save( )) {91 if(!supplierTypeInstance.hasErrors() && supplierTypeInstance.save(flush: true)) { 92 92 flash.message = "SupplierType ${supplierTypeInstance.id} created" 93 93 redirect(action:show,id:supplierTypeInstance.id) -
trunk/grails-app/controllers/SystemSectionController.groovy
r162 r178 67 67 } 68 68 systemSectionInstance.properties = params 69 if(!systemSectionInstance.hasErrors() && systemSectionInstance.save( )) {69 if(!systemSectionInstance.hasErrors() && systemSectionInstance.save(flush: true)) { 70 70 flash.message = "SystemSection ${params.id} updated" 71 71 redirect(action:show,id:systemSectionInstance.id) … … 89 89 def save = { 90 90 def systemSectionInstance = new SystemSection(params) 91 if(!systemSectionInstance.hasErrors() && systemSectionInstance.save( )) {91 if(!systemSectionInstance.hasErrors() && systemSectionInstance.save(flush: true)) { 92 92 flash.message = "SystemSection ${systemSectionInstance.id} created" 93 93 redirect(action:show,id:systemSectionInstance.id) -
trunk/grails-app/controllers/SystemSectionDetailedController.groovy
r162 r178 67 67 } 68 68 systemSectionInstance.properties = params 69 if(!systemSectionInstance.hasErrors() && systemSectionInstance.save( )) {69 if(!systemSectionInstance.hasErrors() && systemSectionInstance.save(flush: true)) { 70 70 flash.message = "SystemSection ${params.id} updated" 71 71 redirect(action:show,id:systemSectionInstance.id) … … 89 89 def save = { 90 90 def systemSectionInstance = new SystemSection(params) 91 if(!systemSectionInstance.hasErrors() && systemSectionInstance.save( )) {91 if(!systemSectionInstance.hasErrors() && systemSectionInstance.save(flush: true)) { 92 92 flash.message = "SystemSection ${systemSectionInstance.id} created" 93 93 redirect(action:show,id:systemSectionInstance.id) -
trunk/grails-app/controllers/TaskController.groovy
r96 r178 27 27 if(taskInstance) { 28 28 try { 29 taskInstance.delete( )29 taskInstance.delete(flush:true) 30 30 flash.message = "Task ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 taskInstance.properties = params 69 if(!taskInstance.hasErrors() && taskInstance.save( )) {69 if(!taskInstance.hasErrors() && taskInstance.save(flush: true)) { 70 70 flash.message = "Task ${params.id} updated" 71 71 redirect(action:show,id:taskInstance.id) … … 77 77 else { 78 78 flash.message = "Task not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def taskInstance = new Task(params) 91 if(!taskInstance.hasErrors() && taskInstance.save( )) {91 if(!taskInstance.hasErrors() && taskInstance.save(flush: true)) { 92 92 flash.message = "Task ${taskInstance.id} created" 93 93 redirect(action:show,id:taskInstance.id) -
trunk/grails-app/controllers/TaskDetailedController.groovy
r175 r178 275 275 } 276 276 taskInstance.properties = params 277 if(!taskInstance.hasErrors() && taskInstance.save( )) {277 if(!taskInstance.hasErrors() && taskInstance.save(flush: true)) { 278 278 flash.message = "Task ${params.id} updated" 279 279 redirect(action:show,id:taskInstance.id) … … 297 297 def save = { 298 298 def taskInstance = new Task(params) 299 if(!taskInstance.hasErrors() && taskInstance.save( )) {299 if(!taskInstance.hasErrors() && taskInstance.save(flush: true)) { 300 300 flash.message = "Task ${taskInstance.id} created" 301 301 redirect(action:show,id:taskInstance.id) -
trunk/grails-app/controllers/TaskGroupController.groovy
r122 r178 27 27 if(taskGroupInstance) { 28 28 try { 29 taskGroupInstance.delete( )29 taskGroupInstance.delete(flush:true) 30 30 flash.message = "TaskGroup ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 taskGroupInstance.properties = params 69 if(!taskGroupInstance.hasErrors() && taskGroupInstance.save( )) {69 if(!taskGroupInstance.hasErrors() && taskGroupInstance.save(flush: true)) { 70 70 flash.message = "TaskGroup ${params.id} updated" 71 71 redirect(action:show,id:taskGroupInstance.id) … … 77 77 else { 78 78 flash.message = "TaskGroup not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def taskGroupInstance = new TaskGroup(params) 91 if(!taskGroupInstance.hasErrors() && taskGroupInstance.save( )) {91 if(!taskGroupInstance.hasErrors() && taskGroupInstance.save(flush: true)) { 92 92 flash.message = "TaskGroup ${taskGroupInstance.id} created" 93 93 redirect(action:show,id:taskGroupInstance.id) -
trunk/grails-app/controllers/TaskModificationController.groovy
r116 r178 27 27 if(taskModificationInstance) { 28 28 try { 29 taskModificationInstance.delete( )29 taskModificationInstance.delete(flush:true) 30 30 flash.message = "TaskModification ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 taskModificationInstance.properties = params 69 if(!taskModificationInstance.hasErrors() && taskModificationInstance.save( )) {69 if(!taskModificationInstance.hasErrors() && taskModificationInstance.save(flush: true)) { 70 70 flash.message = "TaskModification ${params.id} updated" 71 71 redirect(action:show,id:taskModificationInstance.id) … … 77 77 else { 78 78 flash.message = "TaskModification not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def taskModificationInstance = new TaskModification(params) 91 if(!taskModificationInstance.hasErrors() && taskModificationInstance.save( )) {91 if(!taskModificationInstance.hasErrors() && taskModificationInstance.save(flush: true)) { 92 92 flash.message = "TaskModification ${taskModificationInstance.id} created" 93 93 redirect(action:show,id:taskModificationInstance.id) -
trunk/grails-app/controllers/TaskModificationTypeController.groovy
r122 r178 27 27 if(taskModificationTypeInstance) { 28 28 try { 29 taskModificationTypeInstance.delete( )29 taskModificationTypeInstance.delete(flush:true) 30 30 flash.message = "TaskModificationType ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 taskModificationTypeInstance.properties = params 69 if(!taskModificationTypeInstance.hasErrors() && taskModificationTypeInstance.save( )) {69 if(!taskModificationTypeInstance.hasErrors() && taskModificationTypeInstance.save(flush: true)) { 70 70 flash.message = "TaskModificationType ${params.id} updated" 71 71 redirect(action:show,id:taskModificationTypeInstance.id) … … 77 77 else { 78 78 flash.message = "TaskModificationType not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def taskModificationTypeInstance = new TaskModificationType(params) 91 if(!taskModificationTypeInstance.hasErrors() && taskModificationTypeInstance.save( )) {91 if(!taskModificationTypeInstance.hasErrors() && taskModificationTypeInstance.save(flush: true)) { 92 92 flash.message = "TaskModificationType ${taskModificationTypeInstance.id} created" 93 93 redirect(action:show,id:taskModificationTypeInstance.id) -
trunk/grails-app/controllers/TaskPriorityController.groovy
r122 r178 27 27 if(taskPriorityInstance) { 28 28 try { 29 taskPriorityInstance.delete( )29 taskPriorityInstance.delete(flush:true) 30 30 flash.message = "TaskPriority ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 taskPriorityInstance.properties = params 69 if(!taskPriorityInstance.hasErrors() && taskPriorityInstance.save( )) {69 if(!taskPriorityInstance.hasErrors() && taskPriorityInstance.save(flush: true)) { 70 70 flash.message = "TaskPriority ${params.id} updated" 71 71 redirect(action:show,id:taskPriorityInstance.id) … … 77 77 else { 78 78 flash.message = "TaskPriority not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def taskPriorityInstance = new TaskPriority(params) 91 if(!taskPriorityInstance.hasErrors() && taskPriorityInstance.save( )) {91 if(!taskPriorityInstance.hasErrors() && taskPriorityInstance.save(flush: true)) { 92 92 flash.message = "TaskPriority ${taskPriorityInstance.id} created" 93 93 redirect(action:show,id:taskPriorityInstance.id) -
trunk/grails-app/controllers/TaskProcedureController.groovy
r131 r178 27 27 if(taskProcedureInstance) { 28 28 try { 29 taskProcedureInstance.delete( )29 taskProcedureInstance.delete(flush:true) 30 30 flash.message = "TaskProcedure ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 taskProcedureInstance.properties = params 69 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save( )) {69 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save(flush: true)) { 70 70 flash.message = "TaskProcedure ${params.id} updated" 71 71 redirect(action:show,id:taskProcedureInstance.id) … … 77 77 else { 78 78 flash.message = "TaskProcedure not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def taskProcedureInstance = new TaskProcedure(params) 91 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save( )) {91 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save(flush: true)) { 92 92 flash.message = "TaskProcedure ${taskProcedureInstance.id} created" 93 93 redirect(action:show,id:taskProcedureInstance.id) -
trunk/grails-app/controllers/TaskProcedureDetailedController.groovy
r155 r178 91 91 } 92 92 taskProcedureInstance.properties = params 93 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save( )) {93 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save(flush: true)) { 94 94 flash.message = "TaskProcedure ${params.id} updated" 95 95 redirect(action:show,id:taskProcedureInstance.id) … … 123 123 def taskInstance = Task.get(params.taskInstance.id) 124 124 125 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save( )) {125 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save(flush: true)) { 126 126 taskProcedureInstance.addToTasks(taskInstance) 127 127 flash.message = "TaskProcedure ${taskProcedureInstance.id} created." -
trunk/grails-app/controllers/TaskRecurringScheduleController.groovy
r159 r178 67 67 } 68 68 taskRecurringScheduleInstance.properties = params 69 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save( )) {69 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true)) { 70 70 flash.message = "TaskRecurringSchedule ${params.id} updated" 71 71 redirect(action:show,id:taskRecurringScheduleInstance.id) … … 89 89 def save = { 90 90 def taskRecurringScheduleInstance = new TaskRecurringSchedule(params) 91 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save( )) {91 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true)) { 92 92 flash.message = "TaskRecurringSchedule ${taskRecurringScheduleInstance.id} created" 93 93 redirect(action:show,id:taskRecurringScheduleInstance.id) -
trunk/grails-app/controllers/TaskRecurringScheduleDetailedController.groovy
r157 r178 93 93 taskRecurringScheduleInstance.setNextTargetCompletionDate() 94 94 95 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save( ))95 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true)) 96 96 { 97 97 flash.message = "Recurring Schedule ${params.id} updated" … … 139 139 } 140 140 141 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save( )) {141 if(!taskRecurringScheduleInstance.hasErrors() && taskRecurringScheduleInstance.save(flush: true)) { 142 142 143 143 taskInstance.taskRecurringSchedule = taskRecurringScheduleInstance 144 144 145 if(taskInstance.save( )) {145 if(taskInstance.save(flush: true)) { 146 146 flash.message = "Recurring Schedule ${taskRecurringScheduleInstance.id} created" 147 147 redirect(action:show,id:taskRecurringScheduleInstance.id) -
trunk/grails-app/controllers/TaskStatusController.groovy
r122 r178 27 27 if(taskStatusInstance) { 28 28 try { 29 taskStatusInstance.delete( )29 taskStatusInstance.delete(flush:true) 30 30 flash.message = "TaskStatus ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 taskStatusInstance.properties = params 69 if(!taskStatusInstance.hasErrors() && taskStatusInstance.save( )) {69 if(!taskStatusInstance.hasErrors() && taskStatusInstance.save(flush: true)) { 70 70 flash.message = "TaskStatus ${params.id} updated" 71 71 redirect(action:show,id:taskStatusInstance.id) … … 77 77 else { 78 78 flash.message = "TaskStatus not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def taskStatusInstance = new TaskStatus(params) 91 if(!taskStatusInstance.hasErrors() && taskStatusInstance.save( )) {91 if(!taskStatusInstance.hasErrors() && taskStatusInstance.save(flush: true)) { 92 92 flash.message = "TaskStatus ${taskStatusInstance.id} created" 93 93 redirect(action:show,id:taskStatusInstance.id) -
trunk/grails-app/controllers/TaskTypeController.groovy
r122 r178 27 27 if(taskTypeInstance) { 28 28 try { 29 taskTypeInstance.delete( )29 taskTypeInstance.delete(flush:true) 30 30 flash.message = "TaskType ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 taskTypeInstance.properties = params 69 if(!taskTypeInstance.hasErrors() && taskTypeInstance.save( )) {69 if(!taskTypeInstance.hasErrors() && taskTypeInstance.save(flush: true)) { 70 70 flash.message = "TaskType ${params.id} updated" 71 71 redirect(action:show,id:taskTypeInstance.id) … … 77 77 else { 78 78 flash.message = "TaskType not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def taskTypeInstance = new TaskType(params) 91 if(!taskTypeInstance.hasErrors() && taskTypeInstance.save( )) {91 if(!taskTypeInstance.hasErrors() && taskTypeInstance.save(flush: true)) { 92 92 flash.message = "TaskType ${taskTypeInstance.id} created" 93 93 redirect(action:show,id:taskTypeInstance.id) -
trunk/grails-app/controllers/UnitOfMeasureController.groovy
r116 r178 27 27 if(unitOfMeasureInstance) { 28 28 try { 29 unitOfMeasureInstance.delete( )29 unitOfMeasureInstance.delete(flush:true) 30 30 flash.message = "UnitOfMeasure ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 unitOfMeasureInstance.properties = params 69 if(!unitOfMeasureInstance.hasErrors() && unitOfMeasureInstance.save( )) {69 if(!unitOfMeasureInstance.hasErrors() && unitOfMeasureInstance.save(flush: true)) { 70 70 flash.message = "UnitOfMeasure ${params.id} updated" 71 71 redirect(action:show,id:unitOfMeasureInstance.id) … … 77 77 else { 78 78 flash.message = "UnitOfMeasure not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def unitOfMeasureInstance = new UnitOfMeasure(params) 91 if(!unitOfMeasureInstance.hasErrors() && unitOfMeasureInstance.save( )) {91 if(!unitOfMeasureInstance.hasErrors() && unitOfMeasureInstance.save(flush: true)) { 92 92 flash.message = "UnitOfMeasure ${unitOfMeasureInstance.id} created" 93 93 redirect(action:show,id:unitOfMeasureInstance.id)
Note: See TracChangeset
for help on using the changeset viewer.