• 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

Help needed with Spring binding and <form:select>

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to wrap my head on this but here is my scenario.

I have a class object called MovieTimeSlot which stores all movie show times. Which contains a movie object, an id, and timestamp of the showdate/time.



The Movie object looks like this:


I then have my controller, AdminTimeslotController, below is a snippet


My trouble is the jsp page setSchedule. I don't know how to use <form:select> to display the list of movies as an option. This is what I have so far:




I'm receiving an error: Nested Exception is java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'moveTimeslot' available as request attribute

I'm confused how to list the movies in the list. Or, perhaps I'm not thinking this out efficiently and perhaps my workflow needs to be revised.

Thanks.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I think you need to instantiate a form object and put it into the model with name "movieTimeslot" to clear the error "Neither BindingResult nor plain target object ..."

Also, try using "items", "itemValue" and "itemLabel" attributes of SelectTag to display your movie list:



Sorry, I'm not my office to test if the code is syntactically correct.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic