• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Assign an Array to an Array Element  RSS feed

 
Ranch Hand
Posts: 1855
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am iterating through some remote records assigning the field values to a multi-dimension array. I have the case where I have several child records for one particular field. I there a way will looping through the parent records to do an inter loop of child records, assign these to a second array then assign this array to the element of the first array?

I want to produce a dynamic table(1 row for each parent record) with several columns displaying values from parent and then a column with a select box listing the child records associated with the parent.

In practical terms I have a Manufacturing Rejection Tag(parent record) that can have multiple dispositions(child records) and I want to display this record in a single table row using JSTL.
 
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve : Sounds like you have a strategy worth trying. Do you have code for
us to help with? As you know, per Ranch rules, we are not to provide solutions.

Jim ... ...
 
Marshal
Posts: 59773
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no such thing as a multi-dimensional array in Java. Only arrays of arrays. So you can write this sort of thing, which may solve your problem:You might be better off with a List<List><Foo>> because you can alter the sizes of Lists much more easily than the sizes of arrays.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!