Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with jstl forEach spring 2.0 binding

 
John Lintini
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Morning Ranch I am hoping somebody can help me out. I will greatly appreciate it.

I am implementing search functionality to a web form in which a user enters in a value for an Id (say 41). That value is then binded to a searchValue field in my command object, and then I have an Ibatis query that populates a list based on Id 41. The elements in that list are then displayed on a separate page for example

Id: 41 Year:2002 [SUBMIT]
Id: 41 Year:2003 [SUBMIT]
Id: 41 Year:2004 [SUBMIT]
Id: 41 Year:2005 [SUBMIT]
Id: 41 Year:2006 [SUBMIT]
Id: 41 Year:2007 [SUBMIT]

I also have Id and Year properties in my command Object, so my question is how can I bind the Id and Year so that when a user clicks submit for a row it will take them to another page with details populated for that row (ex details for ID=41 year=2003)??

I understand dynamic list binding and how to bind a variable for each iteration of the loop but how can I take the value say command.list[${loop.index}].id and command.list[${loop.index}].year and assign it to the command object Id and Year in order to populate the next page??

Once a user selects a row Im not sure how to dynamically get the binded fields to be assigned to the command id and year fields to run a new query. Please Help!! Thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"newKidOn TheBlock", please check your private messages for an important administrative matter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic