• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

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

Ranch Hand
Posts: 83
  • 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 menucontroller.java 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?
    Bookmark Topic Watch Topic
  • New Topic