• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

How to return a modal in spring controller?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem.

I have a program that uses datatables, each row of the datatable has a button. If a user clicks on the button the values of the row where the button is clicked is passed to the controller.


Here is where I create my datatable.



Here is my controller.



My error is



My problem here is that on the first load of the page, it automatically goes to this controller so the values of the sender and smsc(which is passed if the button is clicked in the datatable).

I'd like to know is there a way to return the controller to a modal in the jsp file?

Or is there any other way I could pass the values?



 
Ranch Hand
Posts: 125
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your datatable AJAX request is mapped to "/smsSenders.json" URI, and not "/dashboard" URI.
Put code that displays the page template with appropriate table headers in "/dashboard", and return data in "/smsSenders.json"
 
Patrick Garcia
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is actually the code to pass the variable to the controller, that is if the user clicks on the button
 
Patrick Garcia
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I even edited the controller. LOGGER doesn't print anything. Do I need to use the @ModelAttribute?
Here's the only thing that tomcat is saying
WebAccessDeniedHandler:35 handle - User: admin attempted to access the protected URL: /cwms/dashboard
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!