Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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
 
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!