File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed with Spring binding and <form:select>

 
laura mccord
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
T. Huy Nguyen
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic