Win a copy of High Performance Python for Data Analytics this week in the Python 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

How to implement server side methods for thymeleaf fragments in Spring MVC?

Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a menu.html file and a class that has controller methods for the menu.

Now I want to include that menu as a fragment in several other html pages.

But when I do that, seems the controller methods of the menu never get called.
So, binding doesn't work and I get this error:
Neither BindingResult nor plain target object for bean name 'mybindingobject' available as request attribute

So my question is:
Isn't it possible to have controller methods for a fragment file?

If that's the case, how to implement server side methods for fragments?
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic