Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem with 2 collection

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

I have 2 collections.
First collection is a collection of Schedule with following attributes.
Schedule = {schedule_id,job_id,client_id}
Another collection is a collection of Job with the following attributes.
Job = {job_id,job_name}

Now in the schedule list page i want to display the job_name for the corresponding job_id of the Schedule in the first collection

that is my list page is as follows

ScheduleName JobName
<name> <name>

How do i accomplish this using struts tag-libs in my JSP.

Thanks
Venkatesh S
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ideally, you should populate your bean in your action to contain the necessary information without having to cross reference the two lists in the jsp. For example, your bean can be a collection of ScheduleJobClient POJO DTOs that looks like this:


That way you can iterate over the ScheduleJobClient list in your bean and display the job name for each schedule.
 
S Venkatesh
Ranch Hand
Posts: 464
Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much. I did the same Its working perfectly now.
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic