• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Help with jstl forEach spring 2.0 binding

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67695
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"newKidOn TheBlock", please check your private messages for an important administrative matter.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic