This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
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

stroing 3d table data data and displaying using struts logic

 
Venkata Kumar
Ranch Hand
Posts: 110
Firefox Browser Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have some data and want to display in browser in table format using jsp and struts.

CITY1
DATE TIME1 TIME2 ..... TIMEN
DATE1 INT_DATA INT_DATA INT_DATA
DATE2 INT_DATA INT_DATA INT_DATA
....
...
DATEN INT_DATA INT_DATA INT_DATA

CITY2
DATE TIME1 TIME2 ..... TIMEN
DATE1 INT_DATA INT_DATA INT_DATA
DATE2 INT_DATA INT_DATA INT_DATA
....
...
DATEN INT_DATA INT_DATA INT_DATA

number of columns and rows are not fixed and can change each time

Which collection object is more suitable to store this data such that i can iterate the object to display the information using struts tags.
Any information on the logic will be really useful.

Thanks,
Sai
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not that familiar with Struts, but a Map<List<X>> looks to be a good fit, with X being the object type for each row.
This map has the cities as keys, and the rows for each city inside the list for that city.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic