• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 89
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic