- Where Developers Learn, Share, & Build Careers


Good afternoon friend.

I have been struggling with a very disappointing problem for the last few days and at the end of my rope, everybody in my team can take some time of that time and this is driving me crazy!

Anyway, I have a controller with the delete action that is called when a user confirms the removal action from the bootstrap modal dialog is called and the redirect statement gets hit properly in the debug . It also shows the call called in Chrome Developer Tool!

But, for some reason, the page never redirects. I have also tried to redirect Google with clearly any other code in action, I do not know what the deal is, I will post a relevant code; Tell me if there is any other code that you may need.

CatalogController.groovy

  def delete = {Def catalog = Catalog.get (params.id) if (Catalog: == blank) {Redirect (Controller: 'Home', Action: 'Dashboard') println "Catalog is empty and can not be removed" return} if (request.method == "post") {// catalog .deleted = Correct Testing to Redirect Works (if catalog.validate ()) {userService.addUserActivity ("deleted Catalog" + catalog.title, catalog.class.getName (), Catalog.Id, null) flash.notice = " The catalog has been deleted "catalog.save () println" catalog successfully deleted "} else {flash.error =" deleted There was an error marking the inventory "} Redirect (Controller: 'home')      Bootstrap model markup   < / P> 
   & lt; div id = "deleteDialog" class = "modal hide fade" tabindex = "- 1" role = "dialog" aria-labelbedby = "myModalLabel" aria-hidden = "True"> 





    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -